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

feat: Version support page #600

Merged
merged 16 commits into from
Jul 30, 2024
Merged

feat: Version support page #600

merged 16 commits into from
Jul 30, 2024

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Jul 8, 2024

Prerequisites checklist

What is the purpose of this pull request?

What changes did you make? (Give an overview)

  • Added a version support page at /version-support
  • Added a "Version Support" link on the homepage under the versions list in the hero
  • Added redirects from translation sites back to the English site for /version-support

Related Issues

Refs #594
Refs eslint/eslint#18621

Is there anything you'd like reviewers to focus on?

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for zh-hans-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/zh-hans-eslint/deploys/66a8fdf11cd10b0008b18562
😎 Deploy Preview https://deploy-preview-600--zh-hans-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/66a8fdf1d242b90008d1322b
😎 Deploy Preview https://deploy-preview-600--es-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/de-eslint/deploys/66a8fdf132c1110008c2eea0
😎 Deploy Preview https://deploy-preview-600--de-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/66a8fdf16b6f2b000874e7b3
😎 Deploy Preview https://deploy-preview-600--ja-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/66a8fdf1b685c000084776d7
😎 Deploy Preview https://deploy-preview-600--pt-br-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/66a8fdf130bb9c0009eaa92f
😎 Deploy Preview https://deploy-preview-600--hi-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for new-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/66a8fdf1d54aab0008e34321
😎 Deploy Preview https://deploy-preview-600--new-eslint.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 configuration.

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit e7da955
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/66a8fdf105d49c0008c620e3
😎 Deploy Preview https://deploy-preview-600--fr-eslint.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 configuration.

src/static/redirects.njk Outdated Show resolved Hide resolved
src/content/pages/index.html Outdated Show resolved Hide resolved
src/content/pages/version-support.md Outdated Show resolved Hide resolved
src/content/pages/version-support.md Outdated Show resolved Hide resolved
src/content/pages/version-support.md Outdated Show resolved Hide resolved
src/content/pages/version-support.md Outdated Show resolved Hide resolved
<dd>
{% set version_date = stats.lastCommitDate | shortDateFromISO %}
{% set dateline = site.homepage.versions.dateline | safe | replace("VERSION", "<a class=\"text-dark\">HEAD</a>") | replace("DATE", version_date) %}
<div class="eslint-versions-container">
Copy link
Member

Choose a reason for hiding this comment

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

Two small notes about the layout after this change, I'm not sure how important they are and whether they're intentional:

  1. The ad and the versions are moved up a bit (when compared to the current eslint.org homepage).

image

  1. On a mobile screen, the Version Support link seems too close to the horizontal line below it.

image

Copy link
Member Author

Choose a reason for hiding this comment

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

For 1, best I can tell, adding the "Version Support" link pushed everything up, but I have no idea why. Someone's who done web development more recently than I can probably figure it out pretty quickly. 😄

For 2, I've updated the styles.

Copy link
Member

Choose a reason for hiding this comment

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

  1. Everything moved up a little bit because of
    padding-block-end: 2rem; padding-bottom: 2rem;

This padding seems to force content to move upwards

Copy link
Member

Choose a reason for hiding this comment

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

In 1, the ad and version shift slightly upward due to the align-items: center property applied to both the .hero>.content-container and .hero .grid elements. The align-items: center property attempts to center-align the child elements, so adding a new element to the right column causes it to shift up slightly.

Screenshot 2024-07-10 at 11 52 20 PM

To fix this, we can do the below steps:

step 1: align .hero>.content-container element normally
image

step 2: The left grid span-1-7 content-container element has some padding applied. Apply the same padding to the right grid as well.

image

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!

nzakas and others added 7 commits July 9, 2024 14:04
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
@nzakas
Copy link
Member Author

nzakas commented Jul 12, 2024

The alignment isn't exactly what it was, but I think it's close enough without getting too hacky.

mdjermanovic
mdjermanovic previously approved these changes Jul 12, 2024
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Leaving open for others to verify and for @nzakas to merge when appropriate.

Copy link
Member

@amareshsm amareshsm left a comment

Choose a reason for hiding this comment

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

The layout appears to be breaking in mobile view.

Steps to reproduce:
Open the preview link on a mobile device, scroll the table to view the data in the rightmost column, and then scroll back to the top.

Screen.Recording.2024-07-12.at.9.33.05.PM.mov

Can we use the Eleventy transform to wrap the table inside a div and make it scrollable on mobile devices to prevent layout issues?
If everyone agrees, I can work on this in a separate PR. This way, we'll have a solution ready for future instances where we need to display tables with many columns.

@nzakas
Copy link
Member Author

nzakas commented Jul 12, 2024

@amareshsm is that possible without forcing us to change the way we write tables in markdown? If so, that sounds like a good idea.

@nzakas nzakas marked this pull request as draft July 12, 2024 20:10
@nzakas
Copy link
Member Author

nzakas commented Jul 12, 2024

Converting to Draft because I'm unsure of the timing around releasing this page. Will talk with the HeroDevs folks and then decide.

@nzakas
Copy link
Member Author

nzakas commented Jul 15, 2024

I was able to use CSS only to create a horizontal scrollbar for the table on small screens.

@@ -208,6 +212,11 @@ table {
background-color: var(--lightest-background-color);
padding: 0.25rem 0.5rem;
}

@media screen and (max-width: 768px) {
display: block;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
display: block;
display: block;

I came across this approach as well. Using display: block for a <table> tag will change its display behaviour. When we set display: block, the <table> element will behave like a block-level element instead of a table. I'm not sure if this is the best approach, so I'll check for any potential side effects.

Copy link
Member

@amareshsm amareshsm Jul 28, 2024

Choose a reason for hiding this comment

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

Setting display: block for the table works fine if the table occupies the full width on mobile. However, if the table doesn't occupy the full width, it causes the table's border to break.

image

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. I think we can fix that pretty easily using CSS.

@nzakas
Copy link
Member Author

nzakas commented Jul 29, 2024

Changed so that table becomes centered when on smaller mobile screens where the content doesn't fill the full width.
Screen Shot 2024-07-29 at 10 47 04

@nzakas nzakas marked this pull request as ready for review July 30, 2024 14:14
nzakas and others added 2 commits July 30, 2024 10:39
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
@nzakas nzakas merged commit ef2bd84 into main Jul 30, 2024
37 checks passed
@nzakas nzakas deleted the version-support branch July 30, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

4 participants