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

"Double click" component card to edit #1598

Open
pomegranited opened this issue Jan 21, 2025 · 1 comment
Open

"Double click" component card to edit #1598

pomegranited opened this issue Jan 21, 2025 · 1 comment
Labels
enhancement Relates to new features or improvements to existing features

Comments

@pomegranited
Copy link
Contributor

cf @sdaitzman 's Slack post:

Double clicking activates selection and maintains focus, except on collections, which are now opened on double click
I also think double click should open the editor modal for XBlocks as well

Implementation details

In this context, "double clicking" a component card is actually two separate single clicks:

  1. First click on the card selects the component, and puts its info into the sidebar.
  2. Second click on the card should open the editor modal.

With #1575, we added sidebar actions to the query string, e.g ?sa=manage-team causes the "Library Team" modal to be opened, and that sa state variable actually controls whether the modal is open or closed.

This implementation should continue this approach by adding another SidebarAction that controls whether the "edit modal" is open or closed for the currently selected component.

Would also be a good idea to refactor the componentBeingEdited / openComponentEditor / openComponentEditor states currently handled by the LibraryContext to make them handled by the new action state in the SidebarContext instead. The other ways of accessing the edit modal must be maintained as well, including the "edit" button on the component sidebar, and the "edit" item on the component card's menu.

@pomegranited pomegranited added the enhancement Relates to new features or improvements to existing features label Jan 21, 2025
@pomegranited
Copy link
Contributor Author

FYI @jmakowski1123 @bradenmacdonald Follow-up feature request for #1499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Relates to new features or improvements to existing features
Projects
Status: No status
Development

No branches or pull requests

1 participant