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

Initial setup for filtering and searching linter rules #6283

Merged
merged 10 commits into from
Jan 4, 2025

Conversation

parlough
Copy link
Member

@parlough parlough commented Dec 18, 2024

@dart-github-bot
Copy link
Collaborator

dart-github-bot commented Dec 18, 2024

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

https://dart-dev--pr6283-feat-filter-lint-rules-94adngwc.web.app

@parlough
Copy link
Member Author

@MaryaBelanger This is WIP from an implementation and style perspective, but I'd appreciate your initial thoughts: https://dart-dev--pr6283-feat-filter-lint-rules-qp9kzihy.web.app/tools/linter-rules#rules

The current implementation is the result of prototyping, but I hope to make it more generic and flexible so it's expandable and a lot can be used on the glossary page as well.

Thanks for taking a look :D

@ericwindmill
Copy link
Contributor

This is awesome, it looks great.

Half baked aside - The three of us should talk about documenting some kind of 'style guide' for the websites ahead of the UI work that Marya and I have started planning for Dart Getting Started and Flutter Fundamentals.

@MaryaBelanger
Copy link
Contributor

Oooo very cool! Love the layout and the concept, couple small ideas from a first look:

  • It'd be nice if we could hover over the icons in each box to see what they mean (only indication of icon meaning is in the rule set drop down, but not all icons are in there and once you're scrolling down you'd have to scroll to the top to see
  • Could the search bar and filters pin to the top once you start scrolling down? (I forget what the term is for that, but like stick with the scroll...). If you've scrolled a lot it'd be nice to not have to scroll back up to change your search.
  • Maybe the icons could serve to replace the few lines at the top of each lint's page, like for avoid_relative_lib_imports:
    image
    (but the icons would have to have definitions when hovered over like I said before)

These are all just nits/things you're probably working on already anyway! Honestly it's amazing as-is and I'd approve publishing it right now!

@parlough parlough force-pushed the feat/filter-lint-rules branch from 8dc3f84 to f522640 Compare January 2, 2025 15:41
@parlough parlough changed the title [WIP] Rough draft for filtering and searching through linter rules Initial setup for filtering and searching linter rules Jan 2, 2025
@parlough parlough marked this pull request as ready for review January 2, 2025 16:12
@MaryaBelanger
Copy link
Contributor

MaryaBelanger commented Jan 2, 2025

/gcbrun

Edit: staging is not working

@parlough
Copy link
Member Author

parlough commented Jan 3, 2025

@MaryaBelanger It looks like staging worked: https://dart-dev--pr6283-feat-filter-lint-rules-94adngwc.web.app/tools/linter-rules#rules

@parlough parlough requested a review from MaryaBelanger January 3, 2025 08:18
@parlough
Copy link
Member Author

parlough commented Jan 3, 2025

It'd be nice if we could hover over the icons in each box to see what they mean (only indication of icon meaning is in the rule set drop down, but not all icons are in there and once you're scrolling down you'd have to scroll to the top to see

These should have a title on hover (and a corresponding accessible label) now. It takes a second to appear as it's just using the built-in browser title for now. Once I add tooltip functionality for glossary work, I can revisit using that for these too.

Could the search bar and filters pin to the top once you start scrolling down? (I forget what the term is for that, but like stick with the scroll...). If you've scrolled a lot it'd be nice to not have to scroll back up to change your search.

Great idea. I couldn't come up with a perfect style and behavior for the stickiness, so if it's ok I'd like to revisit it later on.

Maybe the icons could serve to replace the few lines at the top of each lint's page

Good point. I plan to revisit the individual lint pages soon and I'll see about reusing these icons.


I cleaned up the implementation a bit, but will make it more generic and shared after when I adapt the components to work for the glossary as well. That way I don't unnecessarily over design the abstractions of the implementation :)

Otherwise this is ready for review if you're fine with leaving those changes for follow up.

Copy link
Contributor

@MaryaBelanger MaryaBelanger left a comment

Choose a reason for hiding this comment

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

This is awesome! And yeah I was just spouting off ideas, it's definitely in a very impressive state as is and other ideas can be revisited

@parlough parlough merged commit 62607d6 into main Jan 4, 2025
9 of 10 checks passed
@parlough parlough deleted the feat/filter-lint-rules branch January 4, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants