-
Notifications
You must be signed in to change notification settings - Fork 751
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
WebHost: minor css changes to make Supported Games page usable without js #2266
WebHost: minor css changes to make Supported Games page usable without js #2266
Conversation
Is this different from #2259 ? |
Yes, it's a different approach. There is even a 3rd possible approach that is probably even cleaner from a DOM PoV: inserting the arrows and assigning the classes with JS, however that has a tendency to be blinky if the javascript is not inline in the html. And a 4th that is inserting the arrows using css with ::before, hiding the content has the same potential blinkiness issues though. as a side note: i would change |
I can adjust the JS to not loop over the class elements. Expect a push in a couple days. |
another alternative would be something like |
Oh, that's an interesting one. |
TIL about subsequent combinators. I think @KonoTyran's approach here is ingenious. If we go the route of Jinja with optional JS everywhere, this sort of thing could preserve interactivity for a lot of our pages when users have JS disabled. I think in any case, I want to show the JS search/collapse fields, even if they are non-functional for users with JS turned off. I want to include a message like "Hey, look at the cool stuff you could have with JS turned on." |
It's an approach I've used myself on roll20 character sheets, as they don't allow any JS at all. Worked perfectly fine there. |
I don't think promoting "your version" when the user asked for a "no script version" is helpful. Search functionality is still provided by ctrl+f. Kono's suggestion on the other hand may improve usability of the page by making it faster to read through, however I don't think the old experience was all that bad. |
…ments, use relative element selectors
@black-sliver Let me know what you think of those JS changes. The goal was to remove most id attributes and use relative element referencing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think DOM and JS looks a lot cleaner this way.
Found one mistake where it adds the class to the header instead of the content, breaking the collapse-all when clearing the search box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should leave the TODO:
or how we want to tackle that in general. I've never worked with that kind of fragmented js/css where each page has its own set of files.
Separate HTML / JS / CSS is how I've always organized things unless a framework is involved. I'm okay with removing the TODO. |
…t js (ArchipelagoMW#2266) * WebHost: minor css changes to make Supported Games page usable without js * Update JS to use querySelectorAll, remove most id attributes from elements, use relative element selectors * Hide content when clearing search bar * Remove `console.log`, remove TODO --------- Co-authored-by: Chris Wilson <[email protected]>
…t js (ArchipelagoMW#2266) * WebHost: minor css changes to make Supported Games page usable without js * Update JS to use querySelectorAll, remove most id attributes from elements, use relative element selectors * Hide content when clearing search bar * Remove `console.log`, remove TODO --------- Co-authored-by: Chris Wilson <[email protected]>
No description provided.