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

Improve note Action and Info focus management #2737

Conversation

dcalhoun
Copy link
Member

Fix

  • Remove redundant focus management within note Info. React Modal provides its own focus trap logic, so wrapping with FocusTrap is unnecessary.
  • Support ClipboardButton within focus trap for note actions. In order for clipboard.js to function properly within a focus trap, we must set a container that is "reachable" from within the focus trap.

Test

  1. Open Simplenote.
  2. Click note Actions button (three dots in circle) in the top-right.
  3. Click "Copy Internal Link."
  4. Click "Copy Link."

Expected Outcome: Both internal and public links should be within clipboard
history.

Release

n/a

React Modal provides its own focus trap logic, so wrapping with
`FocusTrap` is unnecessary.
In order for clipboard.js to function properly within a focus trap, we
must set a `container` that is "reachable" from within the focus trap.

https://clipboardjs.com/#advanced-usage
@dcalhoun
Copy link
Member Author

@sandymcfadden this PR represents what I found when investigating usage of clipboard.js within a focus trap. Please feel free to merge/cherrypick/modify/discard any of these changes as you see fit.

@dcalhoun dcalhoun requested a review from sandymcfadden March 10, 2021 19:49
Copy link
Contributor

@sandymcfadden sandymcfadden left a comment

Choose a reason for hiding this comment

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

This looks great, thank you so much for your help with this.

@sandymcfadden sandymcfadden merged commit 1ccff6a into update/spring-cleaning-note-info Mar 10, 2021
@sandymcfadden sandymcfadden deleted the update/note-info-focus-management branch March 10, 2021 20:48
sandymcfadden pushed a commit that referenced this pull request Mar 22, 2021
…still

dark theme on note info, dark theme hover on note actions, remove icons from menubar

remove publish tab from sharing dialog

ignore clickoutside on the icon, remove unused icons

still terrible but slowly getting less terrible

switch position of preview and checklist icon

make publish checkbox work

checkbox styling

lint

adjust note info styles, cross icon, reference link titles

menu item and order changes

Add checkbox styles

Switching from using react-clickoutside to focus-trap-react

Changing clickable divs to buttons

Fix linting error in css

Switch from onClickOutside to focus-trap-react on the note info dialog

Fix package-lock.json file

Improve note Action and Info focus management (#2737)

    Remove redundant focus management within note Info. React Modal provides its own focus trap logic, so wrapping with FocusTrap is unnecessary.
    Support ClipboardButton within focus trap for note actions. In order for clipboard.js to function properly within a focus trap, we must set a container that is "reachable" from within the focus trap.

Update styles for when history is disabled

Update note info styles to match designs.

Update border and boxshadow of note actions

Updates to the note action styles

Add loading state for publishing note

Remove commented out no longer needed styles

Fix css linting error

Testing a throttle on the pin note action

Removing the throttle added in the previous commit

Update styles for note info dialog
sandymcfadden pushed a commit that referenced this pull request Apr 8, 2021
…still

dark theme on note info, dark theme hover on note actions, remove icons from menubar

remove publish tab from sharing dialog

ignore clickoutside on the icon, remove unused icons

still terrible but slowly getting less terrible

switch position of preview and checklist icon

make publish checkbox work

checkbox styling

lint

adjust note info styles, cross icon, reference link titles

menu item and order changes

Add checkbox styles

Switching from using react-clickoutside to focus-trap-react

Changing clickable divs to buttons

Fix linting error in css

Switch from onClickOutside to focus-trap-react on the note info dialog

Fix package-lock.json file

Improve note Action and Info focus management (#2737)

    Remove redundant focus management within note Info. React Modal provides its own focus trap logic, so wrapping with FocusTrap is unnecessary.
    Support ClipboardButton within focus trap for note actions. In order for clipboard.js to function properly within a focus trap, we must set a container that is "reachable" from within the focus trap.

Update styles for when history is disabled

Update note info styles to match designs.

Update border and boxshadow of note actions

Updates to the note action styles

Add loading state for publishing note

Remove commented out no longer needed styles

Fix css linting error

Testing a throttle on the pin note action

Removing the throttle added in the previous commit

Update styles for note info dialog
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.

2 participants