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

Task/tup 534 auto get correct data col value #277

Merged

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Nov 30, 2023

Overview

Get correct data-col value by using a helper function.

Related

Changes

  • add new helper function
  • change data-col values to use function

Testing

  1. Load http://localhost:3000/components/preview/table--cms.
  2. Remember column header texts and order.
  3. Make screen narrow enough that table design changes.
  4. Verify list keys match column headers.

UI

auto data-col

Notes

I welcome (beg for) solutions to reduce the verbosity in templates.

Copy link
Collaborator

@R-Tomas-Gonzalez R-Tomas-Gonzalez left a comment

Choose a reason for hiding this comment

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

Revisiting at a later time to make verbosity... less.

@wesleyboar wesleyboar merged commit ed2863e into task/tup-534 Nov 30, 2023
@wesleyboar wesleyboar deleted the task/tup-534--auto-get-correct-data-col-value branch November 30, 2023 17:48
wesleyboar added a commit that referenced this pull request Jan 25, 2024
* task/tup-534 Adds in media query for tables

* adds in data attributes to each col. Isn't right just yet.

Specifically not working for nested tables just yet. Also, need to look at paragraph tables with no headers - padding adjusts for headers even when there are none...

* removes number from data-col attributes. ie. data-col-(number).

* Task/tup 534  auto get correct data col value (#277)

* test: get correct data-col value (INCOMPLETE)

* feat: get correct col names & values (INCOMPLETE)

* feat: get correct col names & values (SUCCESS)

* chore: clean up new helper getColFromRow

* refactor: less chars in hbs, more logic in config

* fix: remove cruft change

* chore: remove console.log

* fix: missing cols breaks getColFromRow

* chore: simplify previous fix

* added in all styles. Need to check on borders. worked on fractal.

* made changes for nested tables

* Adjusted borders (at least for now) on all tables.

* includes all basic adjustments

accomplishes 1 - 3 on design dev mtg notes.(will attach comments).

* removes border-top:none. Temporarily removes table truncation.

* tier one. adjusting and cleaning up all borders.

 we can adjust from here when/if needed. But for now, they are mimiced from desktop to mobile

* tier 2. Nested Tablesssss.

* tier 3. Table cleanup after subsequent meeting with design

Awaiting design for feedback on nested tables.

* making review changes

* reverting weird formatting changes

* updating to match more reviews

removing commented out code in fractal. commenting out correct table truncation

* docs: revert mismatched comment

* Removal of trump tables. Removal of truncated css.

* fix: restore s-paragraph-table (removed in 0a9b0b6)

This table is a Trump (Scope) pattern used by CMS.

It is loaded by table to keep code DRY, but it should appear in Trumps section of demo.

I welcome discussion of different solutions. This is not the only such case like this.

P.S. The s-truncated-table was removed in 0a9b0b6 also. That's expected. No clients use it. If they want truncation, they can use Core-Styles truncation or do it themselves.

* nested table color change

* add in styles to match design

* style: remove excess spaces

* fix: restore erroneously deleted code

* fix: remove unused styles

peer-programmed with T.G. to confirm

Note: one style W.B. thought should go was retained because it does soemthing:

  table.has-table {
    & tr :is(td,th):last-child {
      border-bottom: unset;
    }
  }

* make adjustments to resolve comments

* fix: restore html-elements.cms.css in docs css

---------

Co-authored-by: Wesley B <[email protected]>
Co-authored-by: Wesley Bomar <[email protected]>
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.

2 participants