-
Notifications
You must be signed in to change notification settings - Fork 95
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
[FC-0036] Refined taxonomy details page #833
Merged
xitij2000
merged 6 commits into
openedx:master
from
open-craft:chris/FAL-3641-refined-taxonomy-details-page
Feb 27, 2024
+103
−54
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
363ed7f
feat: UX refinements on tag list table
ChrisChV 6ea81f7
feat: Add page size to tag list table
ChrisChV 7ce26c7
refactor: TagListTable tests
ChrisChV 45980ba
fix: Datatable pagination
ChrisChV 11fd70c
chore: fix merge conflicts
ChrisChV 5b69ba4
style: Nits on code
ChrisChV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.tag-list-table { | ||
.tag-table-expand-row { | ||
float: right; | ||
} | ||
|
||
table tr:first-child > th:nth-child(2) > span { | ||
// Used to move "Expand all" button to the right. | ||
// Find the first <span> of the second <th> of the first <tr> of the <table>. | ||
// | ||
// The approach of the expand buttons cannot be applied here since the | ||
// table headers are rendered differently and at the component level | ||
// there is no control of this style. | ||
float: right; | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,8 +9,8 @@ import { camelCaseObject, getConfig } from '@edx/frontend-platform'; | |||||||||||||||||||||
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; | ||||||||||||||||||||||
|
||||||||||||||||||||||
const getApiBaseUrl = () => getConfig().STUDIO_BASE_URL; | ||||||||||||||||||||||
const getTagListApiUrl = (taxonomyId, page) => new URL( | ||||||||||||||||||||||
`api/content_tagging/v1/taxonomies/${taxonomyId}/tags/?page=${page + 1}`, | ||||||||||||||||||||||
const getTagListApiUrl = (taxonomyId, page, pageSize) => new URL( | ||||||||||||||||||||||
`api/content_tagging/v1/taxonomies/${taxonomyId}/tags/?page=${page + 1}&page_size=${pageSize}`, | ||||||||||||||||||||||
getApiBaseUrl(), | ||||||||||||||||||||||
).href; | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a suggestion that I think might help avoid any issues that would be hard to spot when needing to update/add queryparams in the future.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||||||||||||||||||||||
|
||||||||||||||||||||||
|
@@ -20,11 +20,11 @@ const getTagListApiUrl = (taxonomyId, page) => new URL( | |||||||||||||||||||||
* @returns {import('@tanstack/react-query').UseQueryResult<import('./types.mjs').TagListData>} | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
export const useTagListData = (taxonomyId, options) => { | ||||||||||||||||||||||
const { pageIndex } = options; | ||||||||||||||||||||||
const { pageIndex, pageSize } = options; | ||||||||||||||||||||||
return useQuery({ | ||||||||||||||||||||||
queryKey: ['tagList', taxonomyId, pageIndex], | ||||||||||||||||||||||
queryFn: async () => { | ||||||||||||||||||||||
const { data } = await getAuthenticatedHttpClient().get(getTagListApiUrl(taxonomyId, pageIndex)); | ||||||||||||||||||||||
const { data } = await getAuthenticatedHttpClient().get(getTagListApiUrl(taxonomyId, pageIndex, pageSize)); | ||||||||||||||||||||||
return camelCaseObject(data); | ||||||||||||||||||||||
}, | ||||||||||||||||||||||
}); | ||||||||||||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think instead of this you should be able to use
d-flex justify-content-end
for the first one and usedisplay:flex; justify-content: flex-end
for the second.IMO using float can sometimes cause issues since it breaks the normal flow of the document.