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(pricing-table): cell items were being horizontally squished into … #11002

Merged

Conversation

bruno-amorim
Copy link
Contributor

…the cell

Related Ticket(s)

https://jsw.ibm.com/browse/ADCMS-3714

Description

In a Pricing Table, for the Table Row when the user choses to "Add Cell Content" for cells to contain multiple paragraphs, or combination of paragraph text, Tag Group tags, or Links, when the page is published the Pricing table is displaying this added cell content distributed horizontally squished into the cell. The Added Cell Content is displaying to the right of the initial cell content in the cell.
Screenshot 2023-10-04 at 11 29 52

I've changed the flex direction to column inside of the cell contents so that all items will sit one below the other.

@bruno-amorim bruno-amorim requested a review from a team as a code owner October 4, 2023 14:30
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 4, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 4, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 4, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 4, 2023

@jkaeser jkaeser added feature flag package: web components Work necessary for the IBM.com Library web components package adopter: AEM used when component or pattern will be used by this adopter owner: Innovation Team used when the engineering work will be done by Hybrid Cloud with DDS engineers as consultants labels Oct 4, 2023
@jkaeser jkaeser requested review from m4olivei and jkaeser October 4, 2023 16:13
Copy link
Member

@jkaeser jkaeser left a comment

Choose a reason for hiding this comment

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

Love it! Simple and effective.

What do you think about updating the Pricing Table stories to slot multiple elements into the table cells, i.e. reflecting the conditions the bug appeared in? This would make it easier for other reviewers to test (I had to manually make changes to the DOM to see the fix in action), and it would help us catch any regressions in the future.

@bruno-amorim
Copy link
Contributor Author

@jkaeser
I totally agree!! I'll update the stories so that the Pricing Table has more elements inside each cell, making it easier to test it and also preview what it can feature.

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 4, 2023

Copy link
Member

@jkaeser jkaeser left a comment

Choose a reason for hiding this comment

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

You know what, @bruno-amorim ? I just remembered why this was made into a flex container to begin with. There's an option to add an icon into the cell content (e.g. the green checkmark in the Storybook examples), and when that's present, user-entered text should appear appear next to the icon. Sorry for not remembering earlier!

I think the fix is going to be a little more complicated. We need to make sure the user-entered content is wrapped in a containing element (i.e. a <div> or similar) that isn't set to display: flex;, and that containing element needs to be a sibling of the optional icon, both of which need a parent flex container. Something like the following sketch code:

<!-- dds-pricing-table-cell's shadow-root markup -->
<div style="display: flex;">
  <div class="optional-icon"></div>
  <div class="user-content">
    <slot></slot>
  </div>
</div>

The tricky part is going to be getting that to work with all the other existing features, such as annotations. Let me know if you want a hand reasoning through it.

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 10, 2023

Copy link
Member

@jkaeser jkaeser left a comment

Choose a reason for hiding this comment

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

Nicely done, @bruno-amorim! I left one small note for potential cleanup, but this looks great.

Copy link
Contributor

@oliviaflory oliviaflory left a comment

Choose a reason for hiding this comment

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

  • 1. There needs to be some margin between the body & tag and tag & link elements, they should not touch each other as they do in the current build. If you do not have a designer specing these spacings for you, I would suggest:
  • 8px top padding above the tag component
  • 16px top padding above the link component

Screenshot 2023-10-13 at 11 56 40 AM

  • 2. The link is too large in hierarchy compared to the rest of the pricing table content. It looks like this is using the Carbon for IBM.com link with icon, but in this case it should use the default Carbon link to result in a 14px type size. See the CWC storybook example. I would also suggest that links within the pricing table such as these should be the inline link style instead of the link with icon

Screenshot 2023-10-13 at 12 15 34 PM

@oliviaflory oliviaflory added the Needs design approval PRs on feature requests and new components have to get design approval before merge. label Oct 16, 2023
@bruno-amorim
Copy link
Contributor Author

Hi @oliviaflory
Please refer to John's last message.
I also have added some more padding so the items look better - https://ibmdotcom-webcomponents.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/11002/index.html?path=/story/experimental-pricing-table--default
Would you please review again?

cc @jkaeser

Copy link
Member

@jkaeser jkaeser left a comment

Choose a reason for hiding this comment

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

@bruno-amorim Thanks for making those updates! There's still some adjustments needed, though. Can you:

  1. Remove the tags and CTA content
  2. Wrap the existing lorem ipsum text in a <span>
  3. Add another small amount of example text wrapped in another <span>
    • Example text: "Donec metus dui, pharetra sit amet dui eu, posuere imperdiet leo. Mauris vel quam vitae sem tincidunt pharetra. Etiam luctus placerat orci, non ultricies augue."

I think that will get us enough representative content to ensure our bug is fixed, and it should also be acceptable from a design point of view.

Let me know if you have any questions!

@bruno-amorim bruno-amorim requested a review from jkaeser October 23, 2023 16:51
Copy link
Contributor

@oliviaflory oliviaflory left a comment

Choose a reason for hiding this comment

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

@bruno-amorim @jkaeser I apologize for the delayed review, I was out sick last week.

The multiple paragraphs look good, thank you for cleaning up the examples and removing the tags from the inner rows & columns.

One thing I will point out is that the checkmarks were not originally intended to be used in tandem with text so that the user's eye doesn't have to zig-zag down the page.

Current build
Screenshot 2023-10-30 at 12 06 47 PM

Intended use
Screenshot 2023-10-30 at 12 01 43 PM

I am going to approve this so that you can start using the multi-paragraph, but would really prefer to not showcase the checkmark and text together in the storybook examples. If you could make an update to the storybook preview I would appreciate it!

@oliviaflory oliviaflory removed the Needs design approval PRs on feature requests and new components have to get design approval before merge. label Nov 6, 2023
@ibmdotcom-bot
Copy link
Contributor

@jkaeser jkaeser added the Ready to merge Label for the pull requests that are ready to merge label Nov 22, 2023
@ibmdotcom-bot
Copy link
Contributor

@andy-blum
Copy link
Contributor

Please re-target this PR to the v1 branch

@kodiakhq kodiakhq bot removed the Ready to merge Label for the pull requests that are ready to merge label Nov 30, 2023
Copy link
Contributor

kodiakhq bot commented Nov 30, 2023

This PR currently has a merge conflict. Please resolve this and then re-add the Ready to merge label.

@andy-blum andy-blum changed the base branch from main to v1 December 5, 2023 19:57
@andy-blum andy-blum closed this Dec 5, 2023
@andy-blum andy-blum reopened this Dec 5, 2023
Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me!

@kennylam kennylam added the Ready to merge Label for the pull requests that are ready to merge label Dec 8, 2023
@kodiakhq kodiakhq bot merged commit 14f8249 into carbon-design-system:v1 Dec 8, 2023
31 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: AEM used when component or pattern will be used by this adopter feature flag owner: Innovation Team used when the engineering work will be done by Hybrid Cloud with DDS engineers as consultants package: web components Work necessary for the IBM.com Library web components package Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants