civictheme / uikit

UI atomic component-based library with Storybook integration
https://uikit.civictheme.io/
GNU General Public License v2.0
5 stars 4 forks source link

Navigation cards within list appear broken #73

Closed AlexSkrypnyk closed 3 months ago

AlexSkrypnyk commented 8 months ago

Description

Whilst looking into CIVIC-1143: Design: Navigation Card UAT it was noticed the navigation cards are not displaying as expected within the manual list.

This was tested with the side nav hidden and displaying, with 1 card, 2 cards and 3 cards. Each test results in issues.

Also noted, the documentation is incomplete for this component. Will create a separate task for that.

Steps to reproduce.

  1. Create a manual list using navigation cards
  2. In the ‘content’ section. add up to three cards, each with title, image, summary and link
  3. In the ‘fields’ section, leave empty or add a title and summary (issue is present regardless)
  4. In the appearance select the column count to match the number of cards. Other items can stay blank.
  5. Save the page.

Observed outcome

_CIVIC-1525__UI_Kit__GitHub___Navigation_cards_within_list_appear_broken_-_JIRA

Expected outcome

_CIVIC-1525__UI_Kit__GitHub___Navigation_cards_within_list_appear_broken_-_JIRA
AlexSkrypnyk commented 8 months ago

@fionamorrison23 Could you please clarify when multiple cards are expected to look different than a single card? As per figma, the image appears at the bottom only on mobile.

fionamorrison23 commented 8 months ago

@AlexSkrypnyk the issue I originally reported was actually user error. I failed to set the Appearance to Fill width in the last row. However, upon attempting to reproduce the original error I did find that the card is not displaying as per design. The design gives the impression the height of the card is related to how much content is present. I created two navigation cards is a row and the result is a lot of white space below the card content. Storybook appears to behave as expected - the card height responds to the amount of content. Close this ticket and raise a new one? Or update this ticket?

DEV

Screenshot 2024-01-23 at 8 55 00 am

Figma

Screenshot 2024-01-23 at 8 54 38 am

Storybook Although this only shows 1 card, you can see how the height changes when the amount of content changes

Screenshot 2024-01-23 at 9 00 28 am Screenshot 2024-01-23 at 9 00 51 am
AlexSkrypnyk commented 8 months ago

@fionamorrison23 I think we need a new ticket because we need to have clear definitions on how the card should be resized exactly, keeping in mind that there should be some min height added (or the card will collapse vertically and will look weird).

Also, the width of the card should either be set as % of the width (50% for example) OR be a fixed width OR be a fixed width, but not less or more that a percentage of the width.

All of the above need to be defined in the ACs and may require Figma as well as UIKit updates.

fionamorrison23 commented 8 months ago

Closing. See previous comments.

AlexSkrypnyk commented 3 months ago

@fionamorrison23 The concern about the image of the card was resolved in https://github.com/civictheme/uikit/issues/148

Cursor_and_CivicTheme__Design_System_v1_8_0__WIP_

We now need to make Navigation card component used in the List component to automatically re-flow to become vertical if there is not enough space in the list. This will address the exact problem provided in the description of this ticket.

I'm going to re-open this since there is no point re-creating the same ticket again.

AlexSkrypnyk commented 3 months ago

https://github.com/civictheme/uikit/assets/378794/7cb0c25b-6ce9-4281-915d-25189db9369e

https://github.com/civictheme/uikit/assets/378794/07c619ab-1361-4d80-ab7f-03d9c6b41b5d

sonamchaturvedi28 commented 3 months ago

Test Env: DEV Test Status: PASS Test Result:

https://github.com/civictheme/uikit/assets/51696317/d934ba7f-94a3-4ce5-823d-11e4567db00d

Screenshot 2024-06-03 at 11 33 42 AM Screenshot 2024-06-03 at 11 41 48 AM