Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Svelte: collapse path when too long#63082

Merged
camdencheek merged 3 commits into
mainfrom
cc/collapse-path
Jun 5, 2024
Merged

Svelte: collapse path when too long#63082
camdencheek merged 3 commits into
mainfrom
cc/collapse-path

Conversation

@camdencheek

@camdencheek camdencheek commented Jun 4, 2024

Copy link
Copy Markdown
Member

This applies the sizeToFit action to the file header, allowing us to collapse the header in multiple steps:

  • First, collapse the actions down to icons
  • Next, collapse elements one by one from the front of the path and put them in an overflow dropdown

Test plan

Mostly manual testing. Video demo. Specifically tested that jumps in screen size work as expected.

@cla-bot cla-bot Bot added the cla-signed label Jun 4, 2024
@camdencheek camdencheek changed the base branch from main to cc/fix-editor-wrap June 4, 2024 18:24
Comment thread client/web-sveltekit/src/lib/dom.ts Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is no longer used. Since I think the sizeToFit action is more general (grow/shrink can apply a class name), I went ahead and deleted it.

@camdencheek camdencheek marked this pull request as ready for review June 4, 2024 18:30
@camdencheek camdencheek requested a review from a team June 4, 2024 18:30
Base automatically changed from cc/fix-editor-wrap to main June 4, 2024 18:49
@camdencheek camdencheek requested a review from taiyab June 4, 2024 18:50

@fkling fkling left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is amazing :) It could make sense to keep showing a prefix of the path, but we can always iterate on that.

@camdencheek

camdencheek commented Jun 5, 2024

Copy link
Copy Markdown
Member Author

This is amazing :)

Thank you 🙂 I was pleased with how well this worked out

It could make sense to keep showing a prefix of the path

Yeah, agreed. The logic got more annoying that way though, so I figured I should start simple and easy to review

@camdencheek camdencheek merged commit d61368d into main Jun 5, 2024
@camdencheek camdencheek deleted the cc/collapse-path branch June 5, 2024 13:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants