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

Show save dialog on hover #1010

Open
boriskovar-m2ms opened this issue Nov 9, 2022 · 2 comments
Open

Show save dialog on hover #1010

boriskovar-m2ms opened this issue Nov 9, 2022 · 2 comments

Comments

@boriskovar-m2ms
Copy link
Collaborator

boriskovar-m2ms commented Nov 9, 2022

See this example: https://codepen.io/alexd2/pen/PRbjxz/
This change will affect the behavior of the save button where contents of save dialog (for both project and snapshot) will be displayed in this style of the dialog.

Additionally this mechanism will be used for switching between snapshots in project history tree. When you click (or hover?) on the circle representing snapshot there are options:

  1. current snapshot is not modified - snapshot will be switched without any other action required by the user
  2. current snapshot is modified - dialog will be displayed (same style like in the example) with three buttons: 'Switch', 'Quick Save' and 'Save'
  • 'Switch' - will switch to clicked snapshot without saving

  • 'Quick Save' - will save snapshot with default values and switch to clicked snapshot

  • 'Save' - will show save dialog (same style like in the example) where user is able to change default values and after saving a snapshot will be changed to clicked one.

  • part of the issue is creating generalized component that can be attached to any other component with contents of defined by the user of the component and will slide out on hover or click.

@phraenquex
Copy link
Collaborator

This hover-and-display function will be useful for many modals, e.g. the [F] button on the RHS, or the tags on the LHS.

@boriskovar-m2ms
Copy link
Collaborator Author

boriskovar-m2ms commented Dec 22, 2022

Going to park this ticket for few days because there is a very strange issue with underlying component (Popover). When I provide it with anchor element as an object it says it wants function and when I give it function it says it wants object.

Warning: Failed prop type: Invalid prop `anchorEl` supplied to `ForwardRef(Popover)`, expected one of type [function].
Warning: Failed prop type: Material-UI: The `anchorEl` prop provided to the component is invalid.
It should be an Element instance but it's `[object Object]` instead.

EDIT: This seems to be a very weird manifestation of other problem and anchor element should be object but there is something wrong with the element.

@mwinokan mwinokan moved this to Ada Lovelace 2 (hangover) in Fragalysis May 29, 2024
@phraenquex phraenquex moved this from Ada Lovelace 2 (hangover) to Ada Lovelace 3 (flotsam) in Fragalysis Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ada Lovelace 3 (flotsam)
Development

No branches or pull requests

2 participants