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

[Ignore] Individual page diagnostic proof of concept #4560

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

parlough
Copy link
Member

@parlough parlough commented Jan 31, 2023

This a really rough and hacky proof of concept exploring the possibility of each diagnostic being on its own page to see if it's a direction we want to go. If it is a direction we want to go, I will rewrite this setup and code to be much cleaner and performant, and also make the necessary changes in analyzer to make this process easier.

  • The home diagnostic page is now located at tools/diagnostics.
    • This page no longer includes individual details, only the glossary and context definitions, as well as a definition list of the diagnostics themselves.
  • Each diagnostic now has its own page in the format of /tools/diagnostics/diagnostic_name such as `tools/diagnostics/conflicting_constructor_and_static_member.
    • Currently the old diagnostic documentation is kept in its current state, but now that they are on their own page, we can make additions more easily
    • I added a new Jekyll/Liquid filter to insert the word-break opportunity element <wbr /> after underscores in the page h1 header, as the diagnostic names were too long and going off the page.
  • The old diagnostic page still exists at tools/diagnostic-messages, but has the following modifications:
    • Has a JS script which reads the user's fragment and attempts to redirect them to the diagnostic's new page if it exists
    • If the user doesn't have JS enabled, they will see text which explains the documentation for that diagnostic has moved with a link to the new diagnostic documentation.
    • See /tools/diagnostic-messages#conflicting_constructor_and_static_member for an example of the redirect working
    • Disable JS temporarily and visit the previous link to see the existing page with redirect text
    • The page also has a yellow border indicating it's out of date
    • The page is hidden from the sitemap to prevent it from showing up on search
    • The page has a warning at the top linking to the new diagnostics article

@parlough parlough changed the title Individual page diagnostic proof of concept [Ignore] Individual page diagnostic proof of concept Jan 31, 2023
@github-actions
Copy link

github-actions bot commented Jan 31, 2023

Visit the preview URL for this PR (updated for commit bbca002):

https://dart-dev--pr4560-feature-individual-p-sidzadhh.web.app

(expires Mon, 20 Feb 2023 17:09:54 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: d851bc446d3c4d7394c5406c6f07255afc7075f3

@atsansone atsansone added the st.WIP Issue in progress label Sep 1, 2023
@atsansone atsansone added st.blocked Issue cannot continue until another action completes and removed on-hold labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
st.blocked Issue cannot continue until another action completes st.WIP Issue in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants