Skip to content

Conversation

@NicholasFlamy
Copy link
Collaborator

@NicholasFlamy NicholasFlamy commented Feb 3, 2025

Description

This change shows the version selection dropdown in the sidebar with the other navbar components on mobile. Before, this wouldn't work correctly. This also required custom CSS to hide the dropdown in the navbar on mobile because Docusaurus wasn't hiding the dropdown in the navbar like it hides the other elements.

How Has This Been Tested?

  • Regular desktop loading of localhost dev instance through npm run start
  • Inspect Element Dev Console mobile device emulation loading of localhost dev instance through npm run start
  • Test the above within the PR preview docs
  • Tested again after making the CSS less jank and more future-proof. Also, doesn't need a comment in docs\docusaurus.config.js since changing position shouldn't be a problem.

Screenshots (if appropriate)

Mobile sidebar dropdown:
image
Mobile navbar properly hiding components with the custom CSS:
image
Desktop version unaffected (I hovered my mouse over the dropdown for this screenshot):
image

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services)

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 3, 2025
@NicholasFlamy NicholasFlamy added changelog:documentation documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Feb 3, 2025
@NicholasFlamy NicholasFlamy marked this pull request as ready for review February 4, 2025 00:06
@NicholasFlamy NicholasFlamy force-pushed the docs-version-switcher-mobile branch from 70efc92 to 997fe27 Compare February 4, 2025 00:08
@NicholasFlamy NicholasFlamy force-pushed the docs-version-switcher-mobile branch from 997fe27 to ab8cd6e Compare February 4, 2025 16:11
@NicholasFlamy NicholasFlamy requested a review from jrasm91 February 4, 2025 16:22
@NicholasFlamy
Copy link
Collaborator Author

The one thing I can think of to make this jank a bit safer is to set a custom className to something unique so that the CSS will never apply to the wrong thing.

@NicholasFlamy NicholasFlamy added fix:formatting Automatically fix formatting on a PR and removed fix:formatting Automatically fix formatting on a PR labels Feb 4, 2025
@NicholasFlamy NicholasFlamy force-pushed the docs-version-switcher-mobile branch from 61c6502 to 5d85a2c Compare February 4, 2025 22:57
@jrasm91 jrasm91 merged commit c4531fc into immich-app:main Feb 6, 2025
35 checks passed
@NicholasFlamy NicholasFlamy deleted the docs-version-switcher-mobile branch February 25, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:documentation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants