-
Notifications
You must be signed in to change notification settings - Fork 56
Creating an IndexStore
for Quick Navigation
#889
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
Creating an IndexStore
for Quick Navigation
#889
Conversation
Create `IndexStore`
fetch index data in `view/DocumentationTopic`
Get Quick Nav data from `IndexStore`
update items in `indexStore`
add `technologyUrl` prop
fix issues with accessing null items
move data fetching logic to `indexProvider.js`
add `errorFetching` to store
simplify index data path computation logic
add technology prop to store
add tests for `indexProvider`
@swift-ci test |
I've been checking the code and testing Quick Navigation and it's looking good to me! The only thing that I don't like in this current state is that we are duplicating the |
resets store before fetching new indexData
IndexStore
for Quick NavigationIndexStore
for Quick Navigation
do not set `includedArchiveIdentifiers` in Navigator Provider
rename state to `indexState`
simplify logic to find technology index data
remove url related computed properties
move fetching logic to `view/DocumentationTopic`
display index data for correct language variant
save flattened data for all language variants to store
update flatChildren default format
make sure data defaults to swift variant & add tests
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.
This seems cleaner to me overall as a first step of moving this data to a shareable store. 👍
Thanks for working through all these complex layers!
rename and clean up node logic
Improve tests and test description
expect(wrapper.find(QuickNavigationModal).props('children')).toEqual(swiftChildren); | ||
}); | ||
|
||
it('QuickNavigation falls back to swift items, if no objc items', async () => { |
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.
Why do we fallback to swift items? just curious about this
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.
See this issue, DocC defaults to swift when the archive is article only. If this issue is addressed, we can make the update here as well.
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.
Reviewed and tested. LGTM! thanks for working on this!
Bug/issue #, if applicable: rdar://134272215
Summary
This PR creates a new
IndexStore
. The eventual goal is to share this store between the navigator and Quick Navigation.But for this PR, only Quick Navigation will be getting data from the new store.
Additionally, the index data is fetched from the page view instead.
Moves
IncludedArchiveIdentifiers
data fromAppStore
to the newIndexStore
.Testing
Manual testing, verify that Quick Nav still behaves as expected.
I've added some tests. I'm working on adding more.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
npm test
, and it succeeded