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

[DRAFT] chore(storage-browser): replace history with location #5984

Draft
wants to merge 1 commit into
base: feat-storage-browser/main
Choose a base branch
from

Conversation

calebpollman
Copy link
Member

Description of changes

Issue #, if available

Description of how you validated changes

Checklist

  • Have read the Pull Request Guidelines
  • PR description included
  • yarn test passes and tests are updated/added
  • PR title and commit messages follow conventional commit syntax
  • If this change should result in a version bump, changeset added (This can be done after creating the PR.) This does not apply to changes made to docs, e2e, examples, or other private packages.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +46 to +49
/**
* current `location` subpath within a `location`
*/
path: string | undefined;
Copy link
Member Author

Choose a reason for hiding this comment

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

path updates on location change events with a location:

// <bucket>/<prefix>/<path>
// initial: 'my-bucket/my-prefix/'
const path = undefined;

// enter nested location: 'my-bucket/my-prefix/a-folder/'
const path = 'a-folder/';

// enter deeply nested folder: 'my-bucket/my-prefix/a-folder/extra-nested/further-nexted/'
const path = 'a-folder/extra-nested/further-nested/';

// navigate up two levels: 'my-bucket/my-prefix/a-folder/'
const path = 'a-folder/;

Comment on lines +41 to +44
/**
* current `location` metadata
*/
location: LocationData | undefined;
Copy link
Member Author

Choose a reason for hiding this comment

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

location stays stable between navigation events within a location, e.g. entering/exiting a nested folder

Comment on lines +1 to +7
export {
HistoryActionType,
HistoryProvider,
HistoryState,
HistoryProviderProps,
useHistory,
} from './context';
Copy link
Member

Choose a reason for hiding this comment

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

History?

Copy link
Member Author

Choose a reason for hiding this comment

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

"Cmd + c" -> "Cmd + v" problems

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