Update terminology, from reccomended to essential

This commit is contained in:
Alicia Sykes 2024-03-10 23:03:37 +00:00
parent 2899f49625
commit 454d2c27bf
3 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@ export default component$((props: { section: Section }) => {
const originalFilters = { const originalFilters = {
show: 'all', // 'all', 'remaining', 'completed' show: 'all', // 'all', 'remaining', 'completed'
levels: { levels: {
recommended: true, essential: true,
optional: true, optional: true,
advanced: true, advanced: true,
}, },
@ -33,7 +33,7 @@ export default component$((props: { section: Section }) => {
const getBadgeClass = (priority: Priority, precedeClass: string = '') => { const getBadgeClass = (priority: Priority, precedeClass: string = '') => {
switch (priority.toLocaleLowerCase()) { switch (priority.toLocaleLowerCase()) {
case 'recommended': case 'essential':
return `${precedeClass}success`; return `${precedeClass}success`;
case 'optional': case 'optional':
return `${precedeClass}warning`; return `${precedeClass}warning`;
@ -87,7 +87,7 @@ export default component$((props: { section: Section }) => {
case 'advice': case 'advice':
return item.point; return item.point;
case 'level': case 'level':
return ['recommended', 'optional', 'advanced'].indexOf(item.priority.toLowerCase()); return ['essential', 'optional', 'advanced'].indexOf(item.priority.toLowerCase());
default: default:
return 0; return 0;
} }
@ -198,8 +198,8 @@ export default component$((props: { section: Section }) => {
<span class="text-sm">Basic</span> <span class="text-sm">Basic</span>
<input <input
type="checkbox" type="checkbox"
checked={filterState.levels.recommended} checked={filterState.levels.essential}
onChange$={() => (filterState.levels.recommended = !filterState.levels.recommended)} onChange$={() => (filterState.levels.essential = !filterState.levels.essential)}
class="checkbox checkbox-sm checked:checkbox-success" class="checkbox checkbox-sm checked:checkbox-success"
/> />
</label> </label>

View File

@ -151,7 +151,7 @@ export default component$(() => {
totalProgress.value = progress; totalProgress.value = progress;
}) })
makeDataAndDrawChart('recommended', 'hsl(var(--su, 158 64% 52%))'); makeDataAndDrawChart('essential', 'hsl(var(--su, 158 64% 52%))');
makeDataAndDrawChart('optional', 'hsl(var(--wa, 43 96% 56%))'); makeDataAndDrawChart('optional', 'hsl(var(--wa, 43 96% 56%))');
makeDataAndDrawChart('advanced', 'hsl(var(--er, 0 91% 71%))'); makeDataAndDrawChart('advanced', 'hsl(var(--er, 0 91% 71%))');
})); }));
@ -212,7 +212,7 @@ export default component$(() => {
return Promise.all([ return Promise.all([
buildDataForPriority('advanced', 'hsl(0 91% 71%/75%)'), buildDataForPriority('advanced', 'hsl(0 91% 71%/75%)'),
buildDataForPriority('optional', 'hsl(43 96% 56%/75%)'), buildDataForPriority('optional', 'hsl(43 96% 56%/75%)'),
buildDataForPriority('recommended', 'hsl(158 64% 52%/75%)'), buildDataForPriority('essential', 'hsl(158 64% 52%/75%)'),
]).then(datasets => ({ ]).then(datasets => ({
labels, labels,
datasets, datasets,
@ -274,7 +274,7 @@ export default component$(() => {
})); }));
const items = [ const items = [
{ id: 'recommended-container', label: 'Essential' }, { id: 'essential-container', label: 'Essential' },
{ id: 'optional-container', label: 'Optional' }, { id: 'optional-container', label: 'Optional' },
{ id: 'advanced-container', label: 'Advanced' }, { id: 'advanced-container', label: 'Advanced' },
]; ];

View File

@ -18,7 +18,7 @@ export interface Section {
furtherResources?: Link[], furtherResources?: Link[],
} }
export type Priority = 'recommended' | 'optional' | 'advanced'; export type Priority = 'essential' | 'optional' | 'advanced';
export interface Checklist { export interface Checklist {
point: string, point: string,