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

Context menu on data cartouche #5972

Closed
balazsbajorics opened this issue Jun 17, 2024 · 0 comments · Fixed by #5993
Closed

Context menu on data cartouche #5972

balazsbajorics opened this issue Jun 17, 2024 · 0 comments · Fixed by #5993
Assignees
Labels
Data Cartouches, tracing etc

Comments

@balazsbajorics
Copy link
Contributor

balazsbajorics commented Jun 17, 2024

add a context menu for the data cartouche.

it should have two basic entries: edit which just opens the Data Picker, and delete in places where we support deletion of data (ie the optional props of a component)

It should have, greyed out, three more items:
• Jump to data source
• Open in CMS
• Edit Value

@maltenuhn maltenuhn added the Data Cartouches, tracing etc label Jun 18, 2024
@balazsbajorics balazsbajorics self-assigned this Jun 18, 2024
bkrmendy added a commit that referenced this issue Jun 19, 2024
This PR adds a basic context menu to the Data Reference Cartouche.
<img width="315" alt="image"
src="https://github.com/concrete-utopia/utopia/assets/2226774/a4f57aae-cc2c-4fce-8389-376e28d3a68c">

Most of my evening was spent wrestling ContextMenuWrapper. I decided to
"give up" and create a new component which uses a proper portal instead
of horrible x-hacks and whatevers.


**Commit Details:**
- Renamed `ContextMenuWrapper` to `ContextMenuWrapper_DEPRECATED` also
marked it as deprecated
- Added new `ContextMenuWrapper` which takes way less props, uses less
wrapping divs, and uses a Portal.
- `DataCartoucheInner` uses `ContextMenuWrapper`. 
- The only actually working option is `Replace...` which just opens the
data picker
- Everything else is a placeholder for future capability

Fixes #5972

---------

Co-authored-by: Berci Kormendy <korber314@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Cartouches, tracing etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants