Skip to content

Download: enable h1, reduce decisions, remove old info#241

Merged
Krinkle merged 2 commits intomainfrom
download-page
Apr 19, 2024
Merged

Download: enable h1, reduce decisions, remove old info#241
Krinkle merged 2 commits intomainfrom
download-page

Conversation

@Krinkle
Copy link
Member

@Krinkle Krinkle commented Apr 17, 2024

  • Enable the h1 heading. The page content has no custom h1 of its own so looks out of place with other pages on jquery.com.

  • Invert the order of some paragraphs so that links are clear and at the top, with a single recommended option each time and then other links in a bullet list after it.

    E.g. there is now an actual "Download jQuery 3.7.1" button, describing over top that it is the compressed production version, and then a list of other links.

    Explanations of these files now follow the list instead of being in front of it, thus burying the links less.

  • Promote link to browse releases.jquery.com to the first section.

    I've personally never used the links that were in the first section previously as they always felt like too much text to read. When I land on the releases list, I know what each variant is and feel more confident that I'm getting the right one instead of reading the long link labels. If we like this direction and shorter links, taking into account that many people probably already "start" at releases.jquery.com based on links to there from other places and thus only see the short versions there, we could also explore shortening the labels here. I've not done that in this commit yet.

  • Remove outdated info about source maps still being a future/emerging technology.

  • Remove instructions for Bower.

  • Move up "jQuery Migrate plugin" section to the top, right after to "Upgrade".

  • Improve "Yarn" CLI link readability by giving it the full term as its link label, "Yarn CLI" instead of only partly linked.

  • Improve "npm" sentence by linking "npm" and then naming "jquery package" in the second link.

  • Update Pre-Release section to link to releases site instead of to a single file, since there are now quite a lot of variants of this file that people may want to choose between.

  • Update "jQuery CDN" section heading to link to the releases site from its name, and remove outdated sponsorship mention.

  • Improve "Other CDNs" by applying the bolding more focussedly (when an entire paragraph is bold, it's the same as bolding nothing, is my rule of thumb). Ensure the bolded portion is readable and understandable by itself.

  • Remove "Build from Git" section, covered by README where it is presumably more up to date. This is linked to from "About the code".

  • Remove mention of closed jQuery Forum from "About the code", instead link to "Report a bug", matching the link chosen at link to bug tracker in Support menu jquery-wp-content#220.

  • Remove mention of plugins.jquery.com from "About the code". Ref Archive plugins.jquery.com, replace with static site infrastructure-puppet#29.

* Enable the h1 heading. The page content has no custom h1 of its own
  so looks out of place with other pages on jquery.com.

* Invert the order of some paragraphs so that links are clear and at
  the top, with a single recommended option each time and then other
  links in a bullet list after it.

  E.g. there is now an actual "Download jQuery 3.7.1" button,
  describing over top that it is the compressed production version,
  and then a list of other links.

  Explanations of these files now follow the list instead of being in
  front of it, thus burying the links less.

* Promote link to browse releases.jquery.com to the first section.

  I've personally never used the links that were in the first section
  previously as they always felt like too much text to read. When
  I land on the releases list, I know what each variant is and feel
  more confident that I'm getting the right one instead of reading the
  long link labels. If we like this direction and shorter links, taking
  into account that many people probably already "start" at
  releases.jquery.com based on links to there from other places and
  thus only see the short versions there, we could also explore
  shortening the labels here. I've not done that in this commit yet.

* Remove outdated info about source maps still being a future/emerging
  technology.

* Remove instructions for Bower.

* Improve "Yarn" CLI link readability by giving it the full term as
  its link label, "Yarn CLI" instead of only partly linked.

* Improve "npm" sentence by linking "npm" and then naming
  "jquery package" in the second link.

* Update Pre-Release section to link to releases site instead of
  to a single file, since there are now quite a lot of variants of
  this file that people may want to choose between.

* Update "jQuery CDN" section heading to link to the releases site
  from its name, and remove outdated sponsorship mention.

* Improve "Other CDNs" by applying the bolding more focussedly
  (when an entire paragraph is bold, it's the same as bolding nothing,
  is my rule of thumb). Ensure the bolded portion is readable and
  understandable by itself.

* Remove "Build from Git" section, covered by README where it is
  presumably more up to date. This is linked to from "About the code".

* Remove mention of closed jQuery Forum from "About the code",
  instead link to "Report a bug", matching the link chosen at
  jquery/jquery-wp-content#220.

* Remove mention of plugins.jquery.com from "About the code".
  Ref jquery/infrastructure-puppet#29.
@Krinkle
Copy link
Member Author

Krinkle commented Apr 17, 2024

Before After
Screenshot download-ATF1 Screenshot download-ATF2
Screenshot download-full1 Screenshot download-full2

@Krinkle
Copy link
Member Author

Krinkle commented Apr 17, 2024

btw, I removed <a download> because this attribute hasn't worked in any browser for a long time with cross-domain URLs.

Details at https://stackoverflow.com/a/28468261/319266.

In a nut shell: Chrome once allowed it blindly on any URL, regardless of CORS, Firefox only allows it on same-origin, and since 2018 Chrome also supports it only on same-origin URLs. Safari doesn't support it either.

I note that the page already had a "right-click Save as.." instruction for this reason presumably, so that makes more sense now in light of this attribute being ineffective.

One way to make this work, is to emit Content-Deposition: "attachment" response header. That will trigger a browser download, regardless anchor element attribute. However we can't do that on the CDN urls in general. We could for example introduce something like url?download=1 and emit the header on those. The risk with that is of course that people may copy that URL and start using it for other purposes, so perhaps better not.

If we were offerig a zipfile, that would make sense since there is no in-browser context in which one can render a zip file in-page. But for a JS distribution, that's less practical.

Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

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

I like this! I have a few suggestions.

@timmywil
Copy link
Member

I'm not a fan of overwriting headers to force a download. I say don't worry about replacing the download attribute.

Co-authored-by: Timmy Willison <timmywil@users.noreply.github.com>
@Krinkle Krinkle merged commit 25595b9 into main Apr 19, 2024
@Krinkle Krinkle deleted the download-page branch April 19, 2024 14:02
@Krinkle
Copy link
Member Author

Krinkle commented Apr 19, 2024

@timmywil
Copy link
Member

Looks great!

@mgol
Copy link
Member

mgol commented Apr 19, 2024

Looks awesome! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants