[PR #706] [MERGED] fix: note component in json-editor getting out of focus when typing and revert theme switch animation #2845

Closed
opened 2026-02-26 13:31:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/706
Author: @BramSuurdje
Created: 12/5/2024
Status: Merged
Merged: 12/6/2024
Merged by: @havardthom

Base: mainHead: fix-687


📝 Commits (2)

  • 3bc065a fix: note component in json-editor getting out of focus when typing. fixes JSON-Generator Notes Field #687
  • f6ec5ef revert: theme transition

📊 Changes

2 files changed (+54 additions, -95 deletions)

View changed files

📝 frontend/src/app/json-editor/_components/Note.tsx (+54 -41)
📝 frontend/src/styles/globals.css (+0 -54)

📄 Description

Note

We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.

Description

This pull request includes changes to the Note component in the JSON editor and the removal of certain CSS animations from the global styles.

The theme animation was reverted because it is currently too fast. Slowing it down would negatively affect the user experience (UX). Therefore, the best option is to remove it entirely, as it does not add any value.

Improvements to Note component:

The removal of the theme switching animation:

Fixes #687

Type of change

Please check the relevant option(s):

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts.)

Prerequisites

The following efforts must be made for the PR to be considered. Please check when completed:

  • Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
  • Testing performed (I have tested my changes, ensuring everything works as expected)
  • Documentation updated (I have updated any relevant documentation)

Additional Information (optional)

Provide any additional context or screenshots about the feature or fix here.

If there are other pull requests or discussions related to this change, please link them here:

  • Related PR #

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/706 **Author:** [@BramSuurdje](https://github.com/BramSuurdje) **Created:** 12/5/2024 **Status:** ✅ Merged **Merged:** 12/6/2024 **Merged by:** [@havardthom](https://github.com/havardthom) **Base:** `main` ← **Head:** `fix-687` --- ### 📝 Commits (2) - [`3bc065a`](https://github.com/community-scripts/ProxmoxVE/commit/3bc065acbe01f1f5eeb547e4d8c43f6386ec2118) fix: note component in json-editor getting out of focus when typing. fixes JSON-Generator Notes Field #687 - [`f6ec5ef`](https://github.com/community-scripts/ProxmoxVE/commit/f6ec5efc98c37b2f05f941f338d6e992cb523b87) revert: theme transition ### 📊 Changes **2 files changed** (+54 additions, -95 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/app/json-editor/_components/Note.tsx` (+54 -41) 📝 `frontend/src/styles/globals.css` (+0 -54) </details> ### 📄 Description > [!NOTE] > We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged. ## Description This pull request includes changes to the Note component in the JSON editor and the removal of certain CSS animations from the global styles. The theme animation was reverted because it is currently too fast. Slowing it down would negatively affect the user experience (UX). Therefore, the best option is to remove it entirely, as it does not add any value. Improvements to `Note` component: * [`frontend/src/app/json-editor/_components/Note.tsx`](diffhunk://#diff-10882bc0495e03a3e2fdf2ba8e3e5ebafef93082d2ff282d581dd591eacaa06aL15-R15): Added `useRef` to manage input references and restore focus after state updates. [[1]](diffhunk://#diff-10882bc0495e03a3e2fdf2ba8e3e5ebafef93082d2ff282d581dd591eacaa06aL15-R15) [[2]](diffhunk://#diff-10882bc0495e03a3e2fdf2ba8e3e5ebafef93082d2ff282d581dd591eacaa06aR30-R31) [[3]](diffhunk://#diff-10882bc0495e03a3e2fdf2ba8e3e5ebafef93082d2ff282d581dd591eacaa06aR54-R59) [[4]](diffhunk://#diff-10882bc0495e03a3e2fdf2ba8e3e5ebafef93082d2ff282d581dd591eacaa06aL61-R78) [[5]](diffhunk://#diff-10882bc0495e03a3e2fdf2ba8e3e5ebafef93082d2ff282d581dd591eacaa06aL100-R113) The removal of the theme switching animation: * [`frontend/src/styles/globals.css`](diffhunk://#diff-e6bf1e24da330d7592213bd594a1ab4c81481c6727112f2765ae84c4778d51cfL33-L50): Removed custom animation definitions and related keyframes. [[1]](diffhunk://#diff-e6bf1e24da330d7592213bd594a1ab4c81481c6727112f2765ae84c4778d51cfL33-L50) [[2]](diffhunk://#diff-e6bf1e24da330d7592213bd594a1ab4c81481c6727112f2765ae84c4778d51cfL84-L119) Fixes #687 ## Type of change Please check the relevant option(s): - [x] Bug fix (non-breaking change that resolves an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly) - [ ] New script (a fully functional and thoroughly tested script or set of scripts.) ## Prerequisites The following efforts must be made for the PR to be considered. Please check when completed: - [x] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions) - [x] Testing performed (I have tested my changes, ensuring everything works as expected) - [ ] Documentation updated (I have updated any relevant documentation) ## Additional Information (optional) Provide any additional context or screenshots about the feature or fix here. ## Related Pull Requests / Discussions If there are other pull requests or discussions related to this change, please link them here: - Related PR # --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 13:31:33 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2845
No description provided.