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

List of small doc problems #1878

Open
8 tasks
cspotcode opened this issue Aug 13, 2023 · 9 comments
Open
8 tasks

List of small doc problems #1878

cspotcode opened this issue Aug 13, 2023 · 9 comments

Comments

@cspotcode
Copy link
Collaborator

cspotcode commented Aug 13, 2023

A dumping ground for small problems I discover on the website and do not want to create a separate issue.

Formatted as a checklist so that Github shows the "create issue" button and we can spin these into issues if needed.

@cspotcode cspotcode changed the title Doc problems List of small doc problems Aug 13, 2023
@cspotcode
Copy link
Collaborator Author

For "sidebar should auto-scroll to reveal current page" these snippets might work, though I didn't realize we have jQuery when I wrote them.

When link is clicked, save the position of clicked item into localStorage

document.querySelectorAll('.sidebar-scroll .current')[0].getBoundingClientRect().y

When page loads, compare position of current item to desired position from localStorage
offset scrollTop accordingly

document.querySelector('.sidebar-scroll').scrollTop = newValue

@sabadam32
Copy link
Contributor

sabadam32 commented Feb 29, 2024

@cspotcode what is the issue with Sprite guide has broken sidebar due to wrong header levels?
The toctree lists sprite advanced and spritelist at the same level. How should this look?

@cspotcode
Copy link
Collaborator Author

@pushfoo is the best person to ask these days, but I think the issue was that the sidebar should be one-to-one link to page, but the first 3 sidebar links link to the same page. This might confuse the viewer, so they don't think the last link is worth clicking. But the last link is to another page, so the reader would miss out.

tl;dr it's inconsistent

@cspotcode
Copy link
Collaborator Author

Also, it's visually inconsistent. In this screenshot, I clicked on "Drawing with Sprites and Spritelists" but the sidebar highlights "What's a sprite?"

image

@pushfoo
Copy link
Member

pushfoo commented Feb 29, 2024

How should this look?

I've thought about this recently. One fix could be:

  1. Move advanced techniques into their own top-level heading separate sprites
  2. Expand the advanced SpriteList draw order section by mentioning the GPU-based depth support

Also, it's visually inconsistent.

Thank you for reminding me of this. I'll go through the issue again to see if there were notes on fixing this. If I remember correctly, this was JS-related.

@pushfoo
Copy link
Member

pushfoo commented Feb 29, 2024

Recap of my current thoughts:

  • Furo minifies its JS when building locally, which is annoying
  • Current builds of furo may require subtly different class names. Example: current and current-page for the outer <li>, and current on the <a> wrapped inside:
    image
  • Overriding the scroll handler in furo.js might be the way to go
  • I'm not sure if maintaining our own custom vendored version of it is a good idea yet

@sabadam32
Copy link
Contributor

Thanks for the clarification @cspotcode. I am not super familiar with tox yet but I will look into this.

@sabadam32
Copy link
Contributor

Added PR to fix the color boxes. The transparent swatches will show a checkered background in the back. Right now there is only transparent black, which has an opacity of 0 so it looks like no color at all. I don't see any others that have transparency. It is there if we add any.

@sabadam32
Copy link
Contributor

Required by #1429

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

No branches or pull requests

3 participants