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: add experimental single question version #44

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

cdeery
Copy link
Contributor

@cdeery cdeery commented Aug 24, 2023

Add a query parameter "viz=1q" that eliminates the multiple questions and the next button and goes straight to recommendations after asking the question about the job title.
The default behavior without the query parameter is unchanged.

Copy link
Member

@MaxFrank13 MaxFrank13 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this work! I have left a few questions and comments

showGoal: true,
showCurrentJobTitle: true,
alwaysShowCareerInterest: false,
useProgressive: false,
Copy link
Member

Choose a reason for hiding this comment

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

The word "use" is often reserved for hooks so this feels like maybe it could be confusing to a new dev. Maybe isProgressive or showProgressive are better options?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Changed to isProgressive.


return (

useInteractiveBoxSet ? interactiveBox() : selectableBox()
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? I thought it would be covered by the conditional in ViewResults at line 154

{ useInteractiveBoxSet ? (
  <RelatedSkillsInteractiveBoxSet
    jobSkillsList={jobSkillsList}
    selectedJobTitle={selectedJobTitle}
    onChange={handleJobTitleChange}
    useInteractiveBoxSet={useInteractiveBoxSet}
  />
) : (
  <RelatedSkillsSelectableBoxSet
    jobSkillsList={jobSkillsList}
    selectedJobTitle={selectedJobTitle}
    onChange={handleJobTitleChange}
  />
)}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not! I am in the process of factoring it out. I wasn't sure originally if I wanted one component or two.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a remnant of a first pass. Factored out now.

</Alert>
)}
{ /* This should just pass the useInteractiveBoxSet flag to the component */ }
{ useInteractiveBoxSet ? (
Copy link
Member

Choose a reason for hiding this comment

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

Same as the useProgressive boolean. This would probably be better off written as isInteractiveBoxSet or showInteractiveBoxSet to avoid devs thinking it is a hook

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to isInteractiveBoxSet.

const CardComponent = ({ name, skills }) => (
<Card
isClickable
onClick={handleCareerInterestSelect}
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't appear to be doing anything when I test in my local environment. This function handleCareerInterestSelect is used add to the careerInterests array which doesn't change the what the recommendations are in the UI.

I think we need to utilize the onChange function here which calls handleJobTitleChange from ViewResults. Unfortunately, this function is expecting the clicked item to be a control with a e.target.value but since it's a card, we'll have to find a different way to pass the value. This value should be the name of the job so that the rest of the function works properly.

Or perhaps we need an entirely new function for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. This part doesn't actually work. I would love to get your input on how to implement this correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we need an entirely new function for this.

Copy link
Member

@MaxFrank13 MaxFrank13 left a comment

Choose a reason for hiding this comment

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

Approved 👍 after talking in meeting about a follow up ticket

@codecov-commenter
Copy link

Codecov Report

Merging #44 (9620b81) into main (445b365) will decrease coverage by 6.48%.
Report is 12 commits behind head on main.
The diff coverage is 62.37%.

@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   91.59%   85.12%   -6.48%     
==========================================
  Files          30       32       +2     
  Lines         369      457      +88     
  Branches       68       90      +22     
==========================================
+ Hits          338      389      +51     
- Misses         30       65      +35     
- Partials        1        3       +2     
Files Changed Coverage Δ
.../skills-builder-modal/SkillsBuilderProgressive.jsx 6.25% <6.25%> (ø)
...al/view-results/RelatedSkillsInteractiveBoxSet.jsx 10.00% <10.00%> (ø)
src/skills-builder/SkillsBuilder.jsx 71.42% <71.42%> (-28.58%) ⬇️
.../skills-builder-modal/view-results/ViewResults.jsx 96.61% <88.23%> (-3.39%) ⬇️
...er/skills-builder-modal/view-results/data/hooks.js 94.73% <92.85%> (-5.27%) ⬇️
...-modal/select-preferences/CareerInterestSelect.jsx 100.00% <100.00%> (ø)
...der-modal/select-preferences/SelectPreferences.jsx 100.00% <100.00%> (ø)
...builder-modal/view-results/RecommendationStack.jsx 91.66% <100.00%> (+0.75%) ⬆️
...kills-builder-modal/view-results/data/constants.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cdeery cdeery merged commit 990c8ac into main Aug 29, 2023
3 checks passed
@cdeery cdeery deleted the cdeery/APER-2797/SingleQuestionVersion branch August 29, 2023 14:02
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.

3 participants