Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert manage theme followup #2889

Merged
merged 14 commits into from
Jun 26, 2024

Conversation

macintoshhelper
Copy link
Contributor

@macintoshhelper macintoshhelper commented Jun 20, 2024

Why does this PR exist?

Resolve comments in #2883
Closes #2900

What does this pull request do?

  • Add locales for manage themes
  • Remove redundant button styling for manage themes
  • Fixes close button being blocked after editing group name
  • Adds UI for confirm/cancel buttons while renaming theme group name

Testing this change

  1. Click Theme: <Theme Name> then Manage themes >
  2. Try renaming a group and press Esc and confirm that the modal isn't closed
  3. Try renaming a group and check that the Cancel and Confirm buttons work correctly
  4. Click through into a theme, click the group name and click Create new group
  5. Confirm that pressing Esc doesn't close the modal
  6. Check that all locales are showing/resolving properly
  7. In the main modal screen, click to rename a group and confirm that the modal Close button works correctly and isn't blocked

Additional Notes (if any)

After

image

Copy link

changeset-bot bot commented Jun 20, 2024

⚠️ No Changeset found

Latest commit: ae73ceb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

>
Add&nbsp;group
{t('addGroup')}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The &nbsp; seems to be unnecessary, and feels like an antipattern to use HTML characters in locale files. Tried resizing the plugin to minimum width and the button stayed on one line.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree should also be solveable with css

Copy link
Collaborator

@six7 six7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one small comment in slack

>
Add&nbsp;group
{t('addGroup')}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree should also be solveable with css

Copy link
Contributor

@cuserox cuserox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor tweaks. Good!

@@ -117,7 +127,8 @@ export const CreateOrEditThemeForm: React.FC<React.PropsWithChildren<React.Props
autofocus
data-testid="create-or-edit-theme-form--group--name"
{...register('group')}
placeholder="Add group"
placeholder={t('addGroup')}
onKeyDown={handleKeyDown('group')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this not be calling it all the time on any key down event? 🧐

Suggested change
onKeyDown={handleKeyDown('group')}
onKeyDown={() => handleKeyDown('group')}

would that work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the function handleKeyDown to handleGroupKeyDown, the 'group' argument here is redundant since the function is only being used in one place.

@macintoshhelper macintoshhelper merged commit 1404185 into release-139 Jun 26, 2024
7 of 8 checks passed
@macintoshhelper macintoshhelper deleted the fix/2880-revert-manage-theme-followup branch June 26, 2024 15:23
@six7 six7 linked an issue Jul 2, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to Close Manage Themes Modal After Making Edits
3 participants