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: Reorder service as resource fields #1113

Merged
merged 9 commits into from
Feb 10, 2025
Merged

Conversation

AlitaBernachot
Copy link
Collaborator

@AlitaBernachot AlitaBernachot commented Feb 5, 2025

Description

This PR changes the display order for the fields in the service-as-a-resource form.

  • reorder fields: 1. url field 2. Layer or Process name
  • add a placeholder "Process name" if WPS is selected, "Layer name" for others
  • hides the url upload button and add a new one to validate new protocol submission
  • url input has been updated to allow any content or custom icon in place of the orginal "upload" icon

NB. This is preparatory work for next topic (layer name suggestion), some function like handleServiceUrlChange and handleIdentifierSubmit will be improved/clarified in next ticket.

Architectural changes

None

Screenshots

image

NB. The upload button is hidden for now as there is a new "Link to the service" button. The upload button will be used in next PR for layer suggestion.

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

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Affected libs: feature-editor,
Affected apps: metadata-editor,

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

@coveralls
Copy link

coveralls commented Feb 5, 2025

Coverage Status

coverage: 81.624% (-2.4%) from 84.022%
when pulling b07515b on service-reorder-fields
into 923a1d3 on main.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

📷 Screenshots are here!

@AlitaBernachot AlitaBernachot force-pushed the service-reorder-fields branch 3 times, most recently from b404174 to b03f874 Compare February 6, 2025 14:45
Copy link
Collaborator

@cmoinier cmoinier 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 this work! I've left a few comments :)

When testing, I noticed that after submitting the link, the fields stay filled (see screenshot) and the button stays focused. This is maybe not a priority, but I would expect them to cleanup/unfocus because the user might want to add another link without having to delete the previous values, WDYT? Something like the spatial extent input is doing. But on the other hand, it's not like the component was doing it before anyway, so you can decide.

image

@AlitaBernachot
Copy link
Collaborator Author

Thanks for your review!

When testing, I noticed that after submitting the link, the fields stay filled (see screenshot) and the button stays focused.

=> Ok fixed for all gn-ui-button.

This is maybe not a priority, but I would expect them to cleanup/unfocus because the user might want to add another link without having to delete the previous values, WDYT? Something like the spatial extent input is doing. But on the other hand, it's not like the component was doing it before anyway, so you can decide.

=> Ok i have updated the code: now we clear the identifier entry after submit. As for the url I don't know if we should remove it, maybe the user wants to add multiple layer from a same service? Tthis point should be discussed with the UX team maybe?

@AlitaBernachot AlitaBernachot merged commit 9ee0df3 into main Feb 10, 2025
14 checks passed
@AlitaBernachot AlitaBernachot deleted the service-reorder-fields branch February 10, 2025 09:09
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