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

Tune version and language selector styles #1603

Merged
merged 5 commits into from
Sep 20, 2024
Merged

Conversation

agjohnson
Copy link
Collaborator

@agjohnson agjohnson commented Sep 19, 2024

UI issues:

  • Support shrinking select down to variable width, so dropdown icon isn't floating off to the right
  • Without using the dropdowns, it seems the padding below the version was lost
  • FOUC when loading the lists, only the dropdown icons show

@agjohnson agjohnson requested a review from a team as a code owner September 19, 2024 17:48
@agjohnson
Copy link
Collaborator Author

image

Inline looks nicer, but it will wrap if the options are long:

image

@agjohnson
Copy link
Collaborator Author

fe58efc gets rid of the FOUC-ish effect while we are still fetching the API response:

Screencast.from.2024-09-19.12-09-21.webm

@humitos
Copy link
Member

humitos commented Sep 19, 2024

Looks awesome 😎

@agjohnson agjohnson requested a review from humitos September 19, 2024 19:19
@agjohnson
Copy link
Collaborator Author

I can't reproduce the second issue there. I'm not sure why it was happening, but it was still displaying the version as a plain text element and it had no padding. This is an issue stemming from local development being a little hard at the moment maybe. We can maybe disregard it for now.

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Looks great 💯

I'm merging this PR into my own branch so we can re-built it on production. After that, I will do a 3.0.0rc2 so we can install it other places as well to test it more broadly.

@humitos humitos merged commit dbd7fd3 into humitos/selectors Sep 20, 2024
7 checks passed
@humitos humitos deleted the agj/selectors branch September 20, 2024 07:29
humitos added a commit that referenced this pull request Sep 20, 2024
* Show version/language selectors below the title

* Use CSS styles from old attempt

#438

* Update CSS to apply to both selectors

* Prepend the current version if it's hidden

* Split it into two different configs

* Use correct value for language

* Make the selectors more prominent

* Typo fix on comment

* Update CSS

* Update JavaScript

* Always include the version javascript

* Only include the languages if there is one

* Change `display_version` default

* HTML layout rework

* Update docs

* HTML layout fix

* Docs typo

* Update CSS

* Updates from review

* re-compile CSS

* Update CSS

* Apply suggestions from code review

Co-authored-by: Eric Holscher <[email protected]>

* Use the prettier to lint the file

* Whitespaces

* Update event listener

* Update CSS

* Update CSS

* Remove language switch if there are not translations

* Tune version and language selector styles (#1603)

* 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

* Debug: trigger Read the Docs Addons event to test/debug locally (#1606)

* Debug: trigger Read the Docs Addons event to test/debug locally

Closes #1605

* Push missing file

---------

Co-authored-by: Eric Holscher <[email protected]>
Co-authored-by: Anthony <[email protected]>
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.

2 participants