Skip to content

Commit

Permalink
chore: Fix issues causing validation to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuf-musleh committed Nov 5, 2023
1 parent 1563bc3 commit ae14d87
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/unit-taxonomy-tags-drawer/TagBubble.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
}

.implicit > .btn-icon-before svg {
color: #E9E6E4; // $light-400;
}
color: #E9E6E4; // $light-400;
}
2 changes: 1 addition & 1 deletion src/unit-taxonomy-tags-drawer/TaxonomyTagsCollapsible.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

.taxonomy-tags-selector-menu + div {
width: 100%
width: 100%;
}

.taxonomy-tags-selectable-box-set {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.taxonomy-tags-arrow-drop-down {
display: 'flex';
align-items: 'center';
display: "flex";
align-items: "center";
cursor: pointer;
}

Expand Down
2 changes: 1 addition & 1 deletion src/unit-taxonomy-tags-drawer/api/hooks/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const useUnitTaxonomyTagsData = (unitId) => (
);

/**
* @returns {import("../types.mjs").UseQueryResults}
* @returns {import("../types.mjs").UseQueryResult}
*/
export const useUnitData = (unitId) => (
useQuery({

Check warning on line 42 in src/unit-taxonomy-tags-drawer/api/hooks/api.js

View check run for this annotation

Codecov / codecov/patch

src/unit-taxonomy-tags-drawer/api/hooks/api.js#L41-L42

Added lines #L41 - L42 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion src/unit-taxonomy-tags-drawer/api/hooks/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useTaxonomyTagsData, useUnitTaxonomyTagsData, useUnitData } from './api';

/**
* @returns {import("../types.mjs").TaxonomyTagsData | undefined} TODO: Define type
* @returns {import("../types.mjs").TaxonomyTagsData | undefined}
*/
export const useTaxonomyTagsDataResponse = (taxonomyId, fullPathProvided) => {
const response = useTaxonomyTagsData(taxonomyId, fullPathProvided);

Check warning on line 8 in src/unit-taxonomy-tags-drawer/api/hooks/selectors.js

View check run for this annotation

Codecov / codecov/patch

src/unit-taxonomy-tags-drawer/api/hooks/selectors.js#L7-L8

Added lines #L7 - L8 were not covered by tests
Expand Down
42 changes: 42 additions & 0 deletions src/unit-taxonomy-tags-drawer/api/types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,48 @@
* @property {boolean} has_partition_group_components
*/

/**
* @typedef {Object} TaxonomyTagData
* @property {string} id
* @property {string} display_name
* @property {string} category
* @property {boolean} has_children
* @property {string} edited_on
* @property {boolean} published
* @property {string} published_on
* @property {string} studio_url
* @property {boolean} released_to_students
* @property {string} release_date
* @property {string} visibility_state
* @property {boolean} has_explicit_staff_lock
* @property {string} start
* @property {boolean} graded
* @property {string} due_date
* @property {string} due
* @property {string} relative_weeks_due
* @property {string} format
* @property {boolean} has_changes
* @property {UnitActions} actions
* @property {string} explanatory_message
* @property {string} show_correctness
* @property {boolean} discussion_enabled
* @property {boolean} ancestor_has_staff_lock
* @property {boolean} staff_only_message
* @property {boolean} enable_copy_paste_units
* @property {boolean} has_partition_group_components
*/

/**
* @typedef {Object} TaxonomyTagsData
* @property {string} next
* @property {string} previous
* @property {number} count
* @property {number} num_pages
* @property {number} current_page
* @property {number} start
* @property {TaxonomyTagData[]} results
*/

/**
* @typedef {Object} UseQueryResult
* @property {Object} data
Expand Down

0 comments on commit ae14d87

Please sign in to comment.