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

feat: display all child tags in the "bare bones" taxonomy detail page [FAL-3529] [FC-0036] #10

Conversation

bradenmacdonald
Copy link
Member

@bradenmacdonald bradenmacdonald commented Nov 17, 2023

This is a minor improvement to openedx#655

It sort of depends on openedx/openedx-learning#119 but it can be merged even before that one is merged.

This is not the final UI design and all of this can/will be changed - this just makes sure that users can see all the tags in the taxonomy during our initial round of testing.

Before:

Screenshot 2023-11-17 at 3 22 16 PM

After:

Screenshot 2023-11-17 at 3 23 01 PM

Screenshot 2023-11-17 at 3 23 16 PM

Screenshot 2023-11-17 at 3 23 30 PM

@bradenmacdonald
Copy link
Member Author

@pomegranited @rpenido FYI - I don't want to delay openedx#655 so I've made this as a separate PR, but this is an improvement I want to make before we update our sandbox and get users testing it.

@rpenido
Copy link
Member

rpenido commented Nov 20, 2023

Hi @bradenmacdonald!

LGTM. Just need to fix some lint issues to make the tests pass.

If running without openedx/openedx-learning#119 there is some weird behaviors:
Loading the taxonomy imported using our template file it shows the children (all depths) alongside the parents.
image

Edit: I didn't dig too much into it, so the problem is in the backend but I don't know if it is in the get_filtered_tags function, the import code or the template itself.

Should we create a task to take a look at this?

Running the openedx/openedx-learning#119 branch fixed it.

Copy link
Member

@rpenido rpenido left a comment

Choose a reason for hiding this comment

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

LGTM 👍

  • I read through the code
  • I followed the test instructions and ran the code locally
  • I checked for accessibility issues by navigating using the keyboard only
  • User-facing strings are extracted for translation

@bradenmacdonald
Do you think it is better to merge in the branch opencraft branch now or wait openedx#655 get merged and then create a new PR against master?

@@ -2,27 +2,30 @@ import React from 'react';
import { Spinner } from '@edx/paragon';
import { FormattedMessage } from '@edx/frontend-platform/i18n';


Copy link
Member

Choose a reason for hiding this comment

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

Fix lint

Suggested change

import { useSubTags } from './data/api';

const SubTagsExpanded = ({ taxonomyId, parentTagValue }) => {

Copy link
Member

Choose a reason for hiding this comment

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

lint

Suggested change


if (subTagsData.isLoading) {
return <LoadingSpinner />;
} else if (subTagsData.isError) {
Copy link
Member

Choose a reason for hiding this comment

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

lint

Suggested change
} else if (subTagsData.isError) {
}
if (subTagsData.isError) {

@bradenmacdonald
Copy link
Member Author

@rpenido Thanks! I'll wait until your PR is merged (as well as openedx/openedx-learning#119 ), and then I'll re-submit this PR. I don't want to slow down your PR from getting merged.

rpenido and others added 3 commits November 20, 2023 17:15
* feat: System-defined tooltip added

* feat: Taxonomy card menu added. Export menu item added

* feat: Modal for export taxonomy

* feat: Connect with export API

* test: Tests for API and selectors

* feat: Use windows.location.href to call the export endpoint

* test: ExportModal.test added

* style: Delete unnecesary code

* docs: README updated with taxonomy feature

* style: TaxonomyCard updated to a better code style

* style: injectIntl replaced by useIntl on taxonomy pages and components

* refactor: Move and rename taxonomy UI components to match 0002 ADR

* refactor: Move api to data to match with 0002 ADR

* test: Refactor ExportModal tests

* chore: Fix validations

* chore: Lint

* refactor: Moving hooks to apiHooks

* feat: add taxonomy detail page

* fix: address nits in PR review

* refactor: move data/selectors to data/apiHooks

and fix tests to mock useQuery.

* fix: address nits in PR review

* fix: replace taxonomy menu ModalPopup with Dropdown menu

Avoids clicking through to the card when using the menu button to hide
a card's menu.

* fix: change taxonomy URLs

* /taxonomy-list is now /taxonomies, and there's a temporary redirect
* /taxonomy-list/:id: is now /taxonomy/:id:

---------

Co-authored-by: Christofer <[email protected]>
Co-authored-by: XnpioChV <[email protected]>
Co-authored-by: Christofer Chavez <[email protected]>
Co-authored-by: Jillian Vogel <[email protected]>
Co-authored-by: Braden MacDonald <[email protected]>
@bradenmacdonald bradenmacdonald force-pushed the braden/improve-listing-tags-bare-bones branch from c3d9f73 to 9f4d892 Compare November 20, 2023 20:27
@bradenmacdonald
Copy link
Member Author

@rpenido Now that your original PR has merged, I have a new PR. Can you please review it there? openedx#703

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