Skip to content

Conversation

adematte
Copy link
Contributor

This fixes a bug where an item with additional categories was not displayed in the zoom item modal from a section other than its base category.

This fixes a bug where an item with additional categories was not displayed in the zoom item modal from a section other than its base category.

Signed-off-by: Arnaud Dematte <5064637+adematte@users.noreply.github.com>
@adematte
Copy link
Contributor Author

I spotted a similar issue with how the guide's item sections ignores additional categories. If you want i can add a fix for this too on this PR.

@tegioz
Copy link
Collaborator

tegioz commented Dec 20, 2024

Thanks for the fix @adematte!

Yes, please, including the fix for the guide in this PR would be great 🙂

This fixes items with additional categories not showing up in the guide subcategory section.

Signed-off-by: Arnaud Dematte <5064637+adematte@users.noreply.github.com>
@adematte adematte changed the title Fix additional categories ignored in zoom item modal Fix additional categories ignored in zoom item modal and guide Dec 20, 2024
@adematte
Copy link
Contributor Author

@tegioz updated the PR accordingly.

As a side note, it would probably make sense later to refactor globally how landscape fetches some items to better handle those use cases: not sure why data is sometimes coming from window.baseDS while sometimes it's from a utility function.

For instance, we could probably change the fix for the guide to just be:
const itemsInSubcategory = itemsDataGetter.getItemsBySection({category: props.category, subcategory: props.subcategory});

But i don't know landscape2 's code base well enough and I can see it's being heavily worked on: so i played it safe and kept it simple.

@tegioz
Copy link
Collaborator

tegioz commented Dec 20, 2024

Thanks @adematte! @cynthia-sg will take a look at it as soon as possible 👍

@cynthia-sg
Copy link
Contributor

@adematte, it makes sense, I'll take a look, thanks 🙂

@cynthia-sg
Copy link
Contributor

Could you please format the itemsDataGetter file? Thanks

Formatted the file properly

Signed-off-by: Arnaud Dematte <5064637+adematte@users.noreply.github.com>
@adematte
Copy link
Contributor Author

@cynthia-sg oopsie 🐵
Pushed a new commit with proper formatting.

@cynthia-sg cynthia-sg merged commit 1bbb202 into cncf:main Dec 21, 2024
5 checks passed
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.

3 participants