-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Show version/language selectors below the title #1601
Conversation
ca7f615
to
184167c
Compare
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 reviewed the Python & JS, which looks pretty solid. Not knowledgable enough on the CSS :)
This looks like a great start. I'd love to have some indication of what the strings are (eg. the branch and language icons next to them), but that can be added in the next iteration. |
This looks good. I have a lot of CSS fixes that would help this, it's probably easier to just show the change though. The width and padding could use tuning, as the field width look unintentional stretched to the nav bar width I wouldn't add icons here yet, I think I'd play around with making this a combination dropdown field instead of native select elements next. Making this into a custom dropdown gives us some room to explain default versions/languages, add icons for versions/prs/languages, and add more supporting context to the UI that is missing with just a |
@humitos how are you testing this locally? |
I'm not 😅. I'm just pushing and re building the test-builds version |
Roger. What would we need to do to make this locally reproducible? Remote testing seems okay for an initial test, but we don't want to hide these styles from other contributors or things could be prone to breaking. What would be easiest? Mock the custom event with placeholder data? |
Yeah, I didn't want to jump to deep in the mocking for this just yet. I suppose we can follow the pattern we had for multiple versions on debugging but in this case fire the custom event with mocked data. Shouldn't be hard |
I threw up my changes at #1603 because of the issues with testing locally. It changes the fields to variable width instead of hardcoding them to be 10em. We should track fixing the local testing issue, we'll need that for contributors and our own maintenance. |
* Tuning on select width and icon placement * Use better cursor * Add a max width to selects so that they can't overflow * Only add after pseudo element if select exists * Lint
@agjohnson I've done this at #1606 |
@agjohnson this PR is ready to reveiw and merge 👍🏼 |
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.
Looks good for a test! I'm curious to see what this change does in the wild, I've wanted this for a while.
* Debug: trigger Read the Docs Addons event to test/debug locally Closes #1605 * Push missing file
This is a regression introduced in #1601 This PR triggers the search modal when clicking on the "Search docs" input from - inside the flyout if present - the top left navbar
This is a regression introduced in #1601 This PR triggers the search modal when clicking on the "Search docs" input from - inside the flyout if present - the top left navbar
With |
@cristian64 Hi, another user also asked this question and opened an issue at #1624. Please, subscribe there get updates on this topic. We will be working in a solution for this case. |
Allow users to decide whether or not showing a version and language selectors below the title of the documentation.
I'm adding two new configs here:
version_selector
language_selector
I'm re-using the code written some time ago in #438 for CSS styling.
Ideally, we should include this in the 3.0.0 final version and release it on October 7th as planned. That way, people using our own theme will get a nice and integrated version/language selector without the need of using
flyout_display=attached
which re-implements all the flyout and requires disabling the floating one to avoid duplications.Example