-
Notifications
You must be signed in to change notification settings - Fork 32
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: content highlights stepper updates, including refactor to use context selectors and connects to Algolia for course search results #895
Conversation
Codecov ReportBase: 83.46% // Head: 83.52% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #895 +/- ##
==========================================
+ Coverage 83.46% 83.52% +0.05%
==========================================
Files 386 391 +5
Lines 8581 8727 +146
Branches 1825 1850 +25
==========================================
+ Hits 7162 7289 +127
- Misses 1387 1408 +21
+ Partials 32 30 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
092d636
to
2b29eb0
Compare
2b29eb0
to
993d97a
Compare
f83d31e
to
d585630
Compare
af9ec2a
to
ba38a2e
Compare
@@ -68,9 +67,11 @@ | |||
"redux-mock-store": "1.5.4", | |||
"redux-thunk": "2.3.0", | |||
"regenerator-runtime": "0.13.7", | |||
"scheduler": "^0.23.0", |
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.
required peer dependency of use-context-selector
below
|
||
const ContentHighlightRoutes = ({ enterpriseSlug }) => { | ||
const baseContentHighlightPath = `/${enterpriseSlug}/admin/${ROUTE_NAMES.contentHighlights}`; | ||
return ( | ||
<> | ||
<Route | ||
path={baseContentHighlightPath} | ||
component={ContentHighlightsDashboard} | ||
render={(routeProps) => ( | ||
<BaseContentHighlightRoute {...routeProps}> |
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.
[note] We will tackle this test coverage in a separate PR.
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.
Leaving open as a reminder to complete
return history.push(`/${enterpriseSlug}/admin/${ROUTE_NAMES.contentHighlights}/${highlightSetUUID}`); | ||
// redirect to individual highlighted set based on uuid | ||
history.push(`/${enterpriseSlug}/admin/${ROUTE_NAMES.contentHighlights}/${highlightSetUUID}`); | ||
return; |
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.
[note] We will tackle this test coverage in a separate PR.
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.
Leaving open as a reminder to complete
<p> | ||
Create up to 8 highlight collections for your learners. | ||
</p> |
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.
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.
Leaving open as a reminder to complete
}; | ||
|
||
const PriceTableCell = ({ row }) => { | ||
const contentPrice = row.original.firstEnrollablePaidSeatPrice; |
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.
[note] tests will be added for covered in a future PR
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.
Leaving open as a reminder to complete
const handleChange = (e) => { | ||
if (e.target.value.length > 60) { | ||
setIsInvalid(true); | ||
setHighlightTitle({ |
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.
[note] A test will be added in future PR for this coverage.
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.
Leaving open as a reminder to complete
indeterminate, | ||
checked, | ||
...toggleRowSelectedProps | ||
} = row.getToggleRowSelectedProps(); |
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.
Test coverage will be added in a separate PR here.
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.
Leaving open as a reminder to complete
|
||
const SelectContentSelectionStatus = ({ className }) => { | ||
const { toggleAllRowsSelected } = useContext(DataTableContext); | ||
const currentSelectedRowsCount = useContextSelector( |
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.
[note] Test coverage will be added in a future PR here.
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.
Leaving open as a reminder to complete
c2ae683
to
100069c
Compare
v2
use-context-selector
for content highlights, which significantly reduces the performance impacts on component re-rendering when using our architectural approach to using vanilla React context; acts as a polyfill since official support for context selectors is still a proposal).Stepper
step description.Stepper
steps.DataTable
row selection when the cap is reached..env.private
to set these environment variables for local development.POST
to/api/v/1/highlight-sets-admin/
on final CTA click from "Confirm and publish" step to create highlight, prepending it to any existing highlight sets in theEnterpriseAppContext.enterpriseCuration
data without needing to refresh from API.aggregation_key
configured as an attribute for faceting (PR incoming).v1
Added Context, and refactored test/code to pass with context values for title and stepper logic
Initial work on data persist, more work is needed on it at this point
Set up reducer for persisting stepper data
Added logic to title to reflect limit on length of highlight title
Added additional UI changes to match language of the figma
Added reducer for 'Last deleted item' to be used in toast on deletion
For all changes
Only if submitting a visual change