Creating an IndexStore for Quick Navigation#889
Creating an IndexStore for Quick Navigation#889hqhhuang merged 27 commits intoswiftlang:navigator-index-storefrom
IndexStore for Quick Navigation#889Conversation
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
mportiz08
left a comment
There was a problem hiding this comment.
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.
Why do we fallback to swift items? just curious about this
There was a problem hiding this comment.
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.
marinaaisa
left a comment
There was a problem hiding this comment.
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
IncludedArchiveIdentifiersdata fromAppStoreto 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