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

fix: responsive versioned dropdown #3292

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fykaa
Copy link
Contributor

@fykaa fykaa commented Jan 15, 2025

added version width and title
image


fixed dropdown component
before:
image
after:
image

Signed-off-by: Faeka Ansari <[email protected]>
@fykaa fykaa self-assigned this Jan 15, 2025
@fykaa fykaa requested review from a team as code owners January 15, 2025 20:32
Copy link

netlify bot commented Jan 15, 2025

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit b64796c
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/6788f7f0ff22550008e72216
😎 Deploy Preview https://deploy-preview-3292.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hiddeco
Copy link
Contributor

hiddeco commented Jan 15, 2025

I wonder if it would not be more useful to display a version for the "latest" version as well, or to at least mention which version is the latest, i.e. Latest version (v1.2.0). The advantage of this is that if someone knows they are on Kargo v1.1.0, they can then automatically tell they are not on latest.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.05%. Comparing base (03632de) to head (b64796c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3292   +/-   ##
=======================================
  Coverage   52.05%   52.05%           
=======================================
  Files         295      295           
  Lines       26695    26695           
=======================================
  Hits        13895    13895           
  Misses      12041    12041           
  Partials      759      759           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krancour
Copy link
Member

I wonder if it would not be more useful to display a version for the "latest" version as well, or to at least mention which version is the latest, i.e. Latest version (v1.2.0). The advantage of this is that if someone knows they are on Kargo v1.1.0, they can then automatically tell they are not on latest.

Well... this is a bit complicated because I'm not sure we have any reasonable way to infer what branch docs.kargo.io currently points at. If we tried do something like take a guess that it points at the semantically greatest release-x.y branch, we'd end up being wrong anytime a release branch exists for an upcoming release. Two days ago, such a heuristic would have shown 1.1 docs and told people they were looking at 1.2.

But I agree that it would be nice as long as we had a reasonable way to approach it. I think we should put a pin in this and come back to it when we have the luxury of time. I wouldn't want it to block the modest styling improvements in this PR.

@krancour
Copy link
Member

@fykaa this still doesn't look quite right on mobile...

IMG_2997

@fykaa
Copy link
Contributor Author

fykaa commented Jan 16, 2025

this still doesn't look quite right on mobile...

@krancour I gave the dropdown a fixed width on purpose because a dynamic width didn't seem appropriate for select dropdown.
This dropdown will mostly contain options like v1.21.41, Latest Version, or Edge Version, and this size works best for those. For any unrecognized versions, I’ve added a tooltip that displays the full version when hovered over, ensuring users can still see the actual version information for those cases.

Signed-off-by: Faeka Ansari <[email protected]>
@hiddeco
Copy link
Contributor

hiddeco commented Jan 16, 2025

Should the version in the mobile sidebar be either at the top or the very bottom of the menu?

@fykaa
Copy link
Contributor Author

fykaa commented Jan 16, 2025

Should the version in the mobile sidebar be either at the top or the very bottom of the menu?

UPDATE: @hiddeco addressed this here b64796c

@fykaa fykaa force-pushed the feat/versioned-docs-dropdown branch from 1a0799f to b64796c Compare January 16, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants