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

Table: Resolves issue where some CSS classes were malformed #1157

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

MelSumner
Copy link
Contributor

📌 Summary

If merged, this PR resolves HDS-1491, fixing an issue where some CSS classes on the table component were malformed.


👀 Reviewer's checklist:

  • +1 Percy if applicable
  • Confirm that PR has a changelog update via Changesets if needed

💬 Please consider using conventional comments when reviewing this PR.

@MelSumner MelSumner requested a review from a team January 31, 2023 14:37
Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

Is it possible to have a test to check for these classes to prevent future regression?

@MelSumner
Copy link
Contributor Author

I'm thinking about a linting rule that could be applied universally, but I don't have a well-formed solution just yet.

@alex-ju
Copy link
Member

alex-ju commented Jan 31, 2023

I'm thinking in td-test.js, for example, we can have something like this:

  test('it should render with the appropriate `@align` CSS class', async function (assert) {
    await render(hbs`<Hds::Table::Td id="data-test-table-td" @align="right"/>`);
    assert.dom('#data-test-table-td').hasClass('hds-table__td--text-right');
  });

This way we make sure that the appropriate class applies as intended and prevents one from accidentally mangling the applied class name in the future.

@MelSumner
Copy link
Contributor Author

ahh yes, I suppose that would address this specific issue, but I guess I was thinking more broadly.

@vercel
Copy link

vercel bot commented Jan 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
hds-components ✅ Ready (Inspect) Visit Preview Jan 31, 2023 at 4:34PM (UTC)
hds-flight-website ✅ Ready (Inspect) Visit Preview Jan 31, 2023 at 4:34PM (UTC)
hds-website ✅ Ready (Inspect) Visit Preview Jan 31, 2023 at 4:34PM (UTC)

@Dhaulagiri
Copy link
Collaborator

Shouldn't the showcase catch this as well?

Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

💯

@alex-ju
Copy link
Member

alex-ju commented Jan 31, 2023

Shouldn't the showcase catch this as well?

@Dhaulagiri it was reflected in the showcase – I approved the VRT which showed the difference in alignment

@Dhaulagiri
Copy link
Collaborator

@alex-ju thanks for that context! More an issue that we didn't notice when the initial showcase was created 👌

@alex-ju
Copy link
Member

alex-ju commented Jan 31, 2023

@alex-ju thanks for that context! More an issue that we didn't notice when the initial showcase was created 👌

yes, that's true – wanted to flag that we do have an example with alignment to the right; it probably happened during some refactoring

@MelSumner MelSumner merged commit a35a7d0 into main Jan 31, 2023
@MelSumner MelSumner deleted the melsumner/HDS-1491-Table-cell-alignment-classes branch January 31, 2023 17:27
@hashibot-hds hashibot-hds mentioned this pull request Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants