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

[Editor]: Rework action-menu #1024

Merged
merged 4 commits into from
Oct 25, 2024
Merged

[Editor]: Rework action-menu #1024

merged 4 commits into from
Oct 25, 2024

Conversation

cmoinier
Copy link
Collaborator

@cmoinier cmoinier commented Oct 24, 2024

Description

This PR reworks the UI of the action-menu in the dashboard.
It now uses the Angular CDK Overlay like in the import button.

Screenshots

Screenshot from 2024-10-24 15-17-47

image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

component.duplicateRecord.subscribe((r) => (recordToBeDuplicated = r))
component.duplicateRecord.subscribe((r) => {
recordToBeDuplicated = r
})
})

it('emits a duplicateRecord event', () => {
Copy link
Collaborator Author

@cmoinier cmoinier Oct 24, 2024

Choose a reason for hiding this comment

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

This test was modified because it was more of an e2e test than a UT, which should test functions and not UI elements.

Copy link
Collaborator

Choose a reason for hiding this comment

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

that makes sense :) although please keep in mind that sometimes unit tests can interact with the DOM too, if there's some logic related to DOM events for instance!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes! In this case it seemed to me that it was something that could be done (and is already done, actually), in the e2e. I figured it made more sense to test the related logic without all the clicking on the fixture :)

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Affected libs: ui-search, feature-search, feature-router, feature-map, feature-dataviz, feature-record,
Affected apps: metadata-editor, datahub, demo, webcomponents, search, map-viewer,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Oct 24, 2024

📷 Screenshots are here!

@coveralls
Copy link

coveralls commented Oct 24, 2024

Coverage Status

coverage: 85.093% (+1.1%) from 83.955%
when pulling 633452d on ME-rework-options-menu
into dbb45b4 on main.

Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Thank you! The menu works and looks very good.

I think at some point we'll need to factorize all the menu opening code in a separate presentation component, but this can be done later on, especially when we'll want to do the same thing for the rollback confirmation dialog in the editor form:
image

@cmoinier
Copy link
Collaborator Author

cmoinier commented Oct 25, 2024

Thank you! The menu works and looks very good.

I think at some point we'll need to factorize all the menu opening code in a separate presentation component, but this can be done later on, especially when we'll want to do the same thing for the rollback confirmation dialog in the editor form: image

Right, also since the Import menu works in a very similar way, it would make sense indeed. Let's keep that in mind!

@cmoinier cmoinier force-pushed the ME-rework-options-menu branch from 9ba70fb to 633452d Compare October 25, 2024 10:20
@cmoinier cmoinier merged commit 09f416f into main Oct 25, 2024
13 checks passed
@cmoinier cmoinier deleted the ME-rework-options-menu branch October 25, 2024 10:30
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.

3 participants