-
Notifications
You must be signed in to change notification settings - Fork 292
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
base: feat-storage-browser/main
Are you sure you want to change the base?
[DRAFT] chore(storage-browser): replace history with location #5984
Conversation
/** | ||
* current `location` subpath within a `location` | ||
*/ | ||
path: string | undefined; |
There was a problem hiding this comment.
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/;
/** | ||
* current `location` metadata | ||
*/ | ||
location: LocationData | undefined; |
There was a problem hiding this comment.
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
export { | ||
HistoryActionType, | ||
HistoryProvider, | ||
HistoryState, | ||
HistoryProviderProps, | ||
useHistory, | ||
} from './context'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
History?
There was a problem hiding this comment.
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
Description of changes
Issue #, if available
Description of how you validated changes
Checklist
yarn test
passes and tests are updated/addeddocs
,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.