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] : Polish editor form #981

Merged
merged 27 commits into from
Sep 13, 2024
Merged

[Editor] : Polish editor form #981

merged 27 commits into from
Sep 13, 2024

Conversation

cmoinier
Copy link
Collaborator

@cmoinier cmoinier commented Sep 2, 2024

Description

This PR makes UI changes for the editor form.

  • Added the sidebar to the form
  • Styled the autocomplete form accordingly (border style, optionnal search button for spatial extent)
  • Styled the textarea with new tailwind class
  • Added new classes for gn-ui-button (lg/md/sm-gray) to style the form buttons (markdown btn, comeback later btn, & url/alternate text/delete btns in image-input)
  • Full height for all form pages (second page was not)
  • Added proper spacing to multiple fields
  • Added missing translation
  • Styled "About" section accordingly (date inputs should be next to each other)

Architectural changes

The form-field-resource-updated component has been renamed to form-field-date-updated component, since it is now used for both resourceUpdated and recordUpdated fields (the component being non-specific to resourceUpdated).

Screenshots

image

image

image

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

Copy link
Contributor

github-actions bot commented Sep 2, 2024

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

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

Copy link
Contributor

github-actions bot commented Sep 2, 2024

📷 Screenshots are here!

@cmoinier cmoinier marked this pull request as ready for review September 2, 2024 14:10
@cmoinier cmoinier changed the title [WIP] Me/polish UI [Editor] : Polish editor form Sep 2, 2024
@coveralls
Copy link

coveralls commented Sep 2, 2024

Coverage Status

coverage: 81.648% (-0.4%) from 82.082%
when pulling 94713f1 on ME/polish-ui
into dcc96ff on main.

@jahow jahow force-pushed the ME/polish-ui branch 4 times, most recently from 171a5b9 to 95915ae Compare September 9, 2024 12:31
@Angi-Kinas
Copy link
Collaborator

Thank you @cmoinier and @jahow for taking the time to make the editor look better 👍 🚀 🤩

I haven't checked the code yet, but compared the local editor to the mockups and here are some differences I found:

Search page

  • the search bar on the /search page has a gray border that looks off + the blue line below it should be gray instead
    image
  • a small detail, but the number in the badge (sidebar) is not centered vertically
    image
  • the pagination feature should be centered horizontally
    image
  • the sidebar stops at some point while the table continues, should it rather scroll with the user's position?
    image
  • the font sizes of the different tables (metadata records/ my records) are different (16px vs 14px):
    image
    image

Editor

Step 1

  • the update frequency field (dropdown) should span only half of the sections size (horizontally):
    image
  • we use three different fonts in the editor:
    Screenshot from 2024-09-09 15-06-47
  • the background of the national/regional toggle (when selected) should not be black but a dark grey instead (grey900?). Sorry, that's on me!
    image

Step 2

  • small detail: the arrow inside the button is not 100% centered vertically (Attached resources component):
    image
  • another little detail: the distance between the upload section and the first uploaded resource should be slightly bigger:
    image

In general:

  • Should we make the width of the entire form a bit smaller? In the mockups we have a width of 794px and in the editor we are currently at 946px. This leads to the fact that some dropdowns look a bit too wide, e.g.:
    image
    WDYT?
  • UX: When I scroll down on the first page of the wizard and I continue to the third page, I will stay at the bottom of the page, but actually I should continue filling the form at the top of the page. Is it possible to scroll back up, once switching "steps"?

Note:

The autocomplete component needs to be checked once it is ready.

Let me know if anything is not clear.
Thanks again for the effort :-)
It looks really nice!

@jahow
Copy link
Collaborator

jahow commented Sep 11, 2024

@Angi-Kinas thank you for your thorough review!! I've addressed all the comments about the editor.

@cmoinier I've added a commit to make the autocomplete input layout more stable and easier to use, now it looks sort of good both in the datahub and the editor.

image

image

I tried relying on the gn-ui-text-input class as much as possible to avoid creating too many global classes. Also tried to have the icons properly sized based on font size. Also I removed the searchFirst input; now if allowSubmit is false then the button is hidden and a non-interactive icon is shown on the left. I'm not 100% sure this will work, but I figure that in most of these cases the action of "submitting" (which made sense in the datahub because we would do another search) is here not really relevant. Instead we just want to pick one of the shown suggestions.

@jahow jahow force-pushed the ME/polish-ui branch 2 times, most recently from a6ff599 to 8836e40 Compare September 11, 2024 22:04
Instead of hardcoding some layout quirks we now allow each field to have a
custom "colSpan" which lets us change its width in the form

Also adjusted the form field wrapper to not show a label block if it s empty
The delete button is round and does not make the badge bigger
Now the contact card does not handle a remove event at all
The autocomplete component now relies on gn-ui-text-input (css class)
and gn-ui-button (component); its layout should be stable whichever font size
is given, and it should scale nicely; this means that it looks almost the same
in the datahub
* spacing in attached resources
* font for toggle buttons
* scroll to top when switching page
* url input icon alignment
* made the dropdowns in the editor only 50% in width (a little bit
  hacky)

Also added marker to not lose a translation that was done.
@rcaplier
Copy link
Collaborator

Hello, first of all : Whow ! The editor looks so much nicer with this polishing so congrats and thanks for that.

Here are my points:

  • it seems that we still use 3 differents font-family as spotted by Angie
  • the background of the national/regional toggle (when selected) is still black instead of dark grey (grey900?)

Lastly, regarding the auto complete input, I think it looks great now, but I feel like the CSS of the results shown just below when you type in seems to be different than the input. It feels odd to me (there is still a shadow but not on the main input anymore..., the corner seems to not have the same radius as the main input... ).

@jahow
Copy link
Collaborator

jahow commented Sep 13, 2024

it seems that we still use 3 differents font-family as spotted by Angie

I'm looking but could not find the 3 different fonts, do you mean the switch toggle? Its text was changed to "font-family-main", which is one of the two fonts we use (the other being font-family-title)

  • the background of the national/regional toggle (when selected) is still black instead of dark grey (grey900?)

I set it to black because "our" gray-900 is lighter than in figma, and we don't have any color dark enough to match the mockup, other than black.

Lastly, regarding the auto complete input, I think it looks great now, but I feel like the CSS of the results shown just below when you type in seems to be different than the input. It feels odd to me (there is still a shadow but not on the main input anymore..., the corner seems to not have the same radius as the main input... ).

you're right, the autocomplete output feels off (colors, borders, font...); it's actually already the case on main. I think this should be addressed in another ticket to not make this PR bigger than it already is.

Thanks for the review!

@rcaplier
Copy link
Collaborator

it seems that we still use 3 differents font-family as spotted by Angie

I'm looking but could not find the 3 different fonts, do you mean the switch toggle? Its text was changed to "font-family-main", which is one of the two fonts we use (the other being font-family-title)

When I filter the css in the developper tools with "font-family" I find the 3 differents font Angie reported but maybe I'm doing it wrong or maybe my browser is polluted with old cache I don't know. Let's leave it like that then.

  • the background of the national/regional toggle (when selected) is still black instead of dark grey (grey900?)

I set it to black because "our" gray-900 is lighter than in figma, and we don't have any color dark enough to match the mockup, other than black.

Lastly, regarding the auto complete input, I think it looks great now, but I feel like the CSS of the results shown just below when you type in seems to be different than the input. It feels odd to me (there is still a shadow but not on the main input anymore..., the corner seems to not have the same radius as the main input... ).

you're right, the autocomplete output feels off (colors, borders, font...); it's actually already the case on main. I think this should be addressed in another ticket to not make this PR bigger than it already is.

Thanks for the review!

Well, ok, let's merge it then 👍🏻

@jahow jahow merged commit 344a92f into main Sep 13, 2024
14 checks passed
@jahow jahow deleted the ME/polish-ui branch September 13, 2024 13: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.

5 participants