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

[Fix]: Reset map dropdown links #900

Merged
merged 3 commits into from
Jun 17, 2024
Merged

[Fix]: Reset map dropdown links #900

merged 3 commits into from
Jun 17, 2024

Conversation

cmoinier
Copy link
Collaborator

Description

This PR fixes the behavior of the map preview dropdown, which wrongfully included previous dataset's links in any newly opened dataset.

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

This work is sponsored by MEL.

Copy link
Contributor

github-actions bot commented Jun 13, 2024

Affected libs: common-fixtures, api-metadata-converter, feature-search, feature-router, feature-map, feature-dataviz, feature-record, api-repository, feature-catalog, feature-editor, feature-auth, ui-search, ui-elements, feature-notifications, ui-catalog, util-shared, ui-widgets, ui-inputs, ui-layout, ui-map,
Affected apps: metadata-converter, metadata-editor, datahub, demo, webcomponents, map-viewer, search, datafeeder,

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

@coveralls
Copy link

Coverage Status

coverage: 86.529% (+3.2%) from 83.354%
when pulling 4f343bb on fix-map-reset
into cd525aa on main.

Copy link
Contributor

github-actions bot commented Jun 13, 2024

📷 Screenshots are here!

Copy link
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @cmoinier, which works fine !

When testing, I'm just noticing that displaying the drop-down list often takes some time (which might be independent of this PR). Do you think this could still be improved somehow even though the values are dynamic? Maybe wait for displaying the map until there are values? But this could also be improved in a future PR I think.

Maybe adding a test (UT or e2e) for your changes would be nice if not too complicated.

@jahow
Copy link
Collaborator

jahow commented Jun 13, 2024

Maybe adding a test (UT or e2e) for your changes would be nice if not too complicated.

I would suggest simply an UT test focusing on this observable, thanks @cmoinier :)

@cmoinier
Copy link
Collaborator Author

@tkohr @jahow Thanks for the reviews :)

In the last commit I have added a new UT, and used the "loading" variable to keep the map loading until the dropdown has its options. I was not able to test as the options always load pretty fast on my end, so let me know if it doesn't do the trick for you.

@coveralls
Copy link

Coverage Status

coverage: 83.316% (-0.04%) from 83.354%
when pulling 39687a6 on fix-map-reset
into cd525aa on main.

@tkohr
Copy link
Collaborator

tkohr commented Jun 14, 2024

Thanks for the added test @cmoinier! Setting this.loading does not change anything on my side, so I think we can discard this modification. IMO, we can still improve this later (maybe along with the "record not found" message that I also see popping up during loading). But this is clearly out of scope of this PR.

@tkohr
Copy link
Collaborator

tkohr commented Jun 16, 2024

It just came to my mind, that we'll also need a backport of this for the 2.3 release, I guess, but I don't see a 2.3.x branch for now. Do we still need to create this branch and then the according backport label or has the workflow changed recently @jahow ?

@jahow
Copy link
Collaborator

jahow commented Jun 16, 2024

We need to first create the branch and then put the backport tag :)

@coveralls
Copy link

Coverage Status

coverage: 83.358% (+0.004%) from 83.354%
when pulling 05c1efb on fix-map-reset
into cd525aa on main.

@cmoinier cmoinier merged commit e1bb65c into main Jun 17, 2024
10 checks passed
@cmoinier cmoinier deleted the fix-map-reset branch June 17, 2024 14:12
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.

4 participants