Skip to content

Commit

Permalink
task/tup-534 Adds in media query for tables (#275)
Browse files Browse the repository at this point in the history
* 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 <62723358+wesleyboar@users.noreply.github.com>
Co-authored-by: Wesley Bomar <wbomar@tacc.utexas.edu>
  • Loading branch information
3 people authored Jan 25, 2024
1 parent 726b2a9 commit aeb1b32
Show file tree
Hide file tree
Showing 21 changed files with 237 additions and 116 deletions.
2 changes: 1 addition & 1 deletion dist/core-styles.base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-styles.cms.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-styles.portal.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/elements/table--basic.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/elements/table--nested.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/elements/table.cms.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/elements/table.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions fractal.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ engine.handlebars.registerHelper('eq', function(a, b) {
engine.handlebars.registerHelper('has', function(array, item) {
return array.includes(item);
});
engine.handlebars.registerHelper('getColFromRow', function(row, val, cols) {
if ( ! cols ) return '';

const index = Object.entries(row).findIndex(el => el[1] === val);
const col = cols[index];

return col;
});

// Export
module.exports = fractal;
1 change: 0 additions & 1 deletion src/lib/_imports/core-styles.cms.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@
@import url("./trumps/s-drop-cap.css");
@import url("./trumps/s-footer.css");
@import url("./trumps/s-footer--thick.css");
@import url("./trumps/s-truncated-table.css");
2 changes: 0 additions & 2 deletions src/lib/_imports/core-styles.portal.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
/* ELEMENTS */
@import url("./elements/root--portal.css");
@import url("./elements/sticky-footer.css");
@import url("./elements/table.portal.css");

/* OBJECTS */
@import url("./objects/o-flex-item-table-wrap.css");
Expand All @@ -34,4 +33,3 @@
@import url("./trumps/s-footer.css");
@import url("./trumps/s-footer--thin.css");
@import url("./trumps/s-form-page.css");
@import url("./trumps/s-truncated-table.css");
Loading

0 comments on commit aeb1b32

Please sign in to comment.