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(tables): preserve table row heights with icons and thumbnails #1674

Merged
merged 25 commits into from
Apr 5, 2023

Conversation

hannahiss
Copy link
Member

@hannahiss hannahiss commented Dec 1, 2022

Related issues

Fixes #1357

Description

Table lines with icons or thumbnails of 30px x 30px should have a 40px height for standard tables (having .table-sm class) and 50px for large tables (having only .table class).

Motivation & Context

After a design review, it has been concluded that:

  • there are two sizes of table rows : standard (40px) and large (50px) in a design point of view
  • the row heights should be preserved even when containing icons or thumbnaisl (having a 30 x 30 size)

So, the action to do are:

  • ODS examples should be reviewed to comply with these elements (Franco's actions)
  • Boosted code should be adjusted to comply with these elements:
    • implement new shortcode to add blue Boosted callout (info)
    • rename Boosted class bd-ods-incompatibility-alert to bd-ods-alert because it is no longer used only for ODS incompatibilities, but also for recommendations
    • add Boosted info callout at the top of tables page to notice developpers that recommended tables should have the class .table-sm
    • add Boosted info callout in paragraph "Small tables" to notice developpers that this is the recommended tables
    • add negative margins to img and svg to preserve row heights
    • update migration guide to notice new variables Sass
    • add class bd-example when missing

Types of change

  • Bug fix (non-breaking which fixes an issues)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Live previews

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • My change introduces changes to the migration guide
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@netlify
Copy link

netlify bot commented Dec 1, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit f928e8e
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/642d18c6015ce700080084e6
😎 Deploy Preview https://deploy-preview-1674--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Few comments about the actual PR !

site/layouts/shortcodes/ods-recommendation-alert.html Outdated Show resolved Hide resolved
site/layouts/shortcodes/ods-recommendation-alert.html Outdated Show resolved Hide resolved
site/content/docs/5.2/content/tables.md Outdated Show resolved Hide resolved
site/content/docs/5.2/content/tables.md Outdated Show resolved Hide resolved
site/content/docs/5.2/content/tables.md Outdated Show resolved Hide resolved
scss/_tables.scss Show resolved Hide resolved
scss/_tables.scss Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
@julien-deramond

This comment was marked as resolved.

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Some few things to tackle and we're good to go.

site/content/docs/5.2/content/tables.md Outdated Show resolved Hide resolved
site/content/docs/5.2/content/tables.md Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
scss/_variables.scss Outdated Show resolved Hide resolved
scss/_tables.scss Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jan 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

# Conflicts:
#	site/content/docs/5.3/migration.md
@hannahiss
Copy link
Member Author

PR is ok, updated and approved, waiting for design review (card "Dev. Design review >> Tables: Row height with icons and/or thumbnails")

@Franco-Riccitelli
Copy link

Design review of the table sizes

The sizes of the table row heights at 40px and 50px are all good.
Vertical positioning of the text in the tables rows are also good.

Changes: For the 40px high rows - the vertical positioning of the icons and thumbnails in the table need to move down 1px.

@Franco-Riccitelli
Copy link

The vertical positioning of the icons and thumbnails in the table looks good. No more issues.

// Use negative margins on icons in tables to preserve row height
svg,
img {
margin-top: $table-cell-icon-margin-top;
Copy link
Member

Choose a reason for hiding this comment

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

TBH I was a bit afraid when I read it on how the rendering would be with bigger images. But one can disable the default behavior by doing this so I suppose it's OK: <svg class="... my-0" width="5rem" height="5rem" .../>. Here's the rendering FYI:

Screenshot 2023-04-05 at 08 17 17

@sonarcloud
Copy link

sonarcloud bot commented Apr 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julien-deramond julien-deramond changed the title Preserve table row heights with icons and thumbnails fix(tables): preserve table row heights with icons and thumbnails Apr 5, 2023
@julien-deramond julien-deramond merged commit 970fcaa into main Apr 5, 2023
@julien-deramond julien-deramond deleted the main-his-tables-icons-thumbnails branch April 5, 2023 06:49
@julien-deramond julien-deramond mentioned this pull request Apr 5, 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.

Docs > Content > Tables > With icons or thumbnails : Fix column height when contains an icon
4 participants