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

Add visible stable course edit ui #34433

Merged
merged 7 commits into from
May 1, 2020

Conversation

uponthesun
Copy link

@uponthesun uponthesun commented Apr 25, 2020

image

When something is entered for pilot experiment, it automatically changes to:

image

Which should be the same behavior as on the script edit UI.

I did a small refactor to create a new component which combines VisibleInTeacherDashboard and PilotExperiment, which now handles greying out visible if pilot experiment is set. Then it can be used more cleanly between both the script edit and course edit UI. As a result the ordering in the UI is changed slightly - pilot experiment is now between visible and stable.

Testing story

  • Manually tested checking and unchecking both new checkboxes on course edit UI, and also the "Visible in teacher dashboard" checkbox in script edit UI.
  • Updated unit tests

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@davidsbailey
Copy link
Member

@dmcavoy would you be willing to take the first look at this PR?

/>
<p>
If checked, this unit will be eligible to be the recommended version
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should say course instead of unit? "If checked, this course will be eligible to be the recommended version of the course. The most recent eligible version will be the recommended version."

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably add this string to i18n list

Copy link
Author

Choose a reason for hiding this comment

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

On course / unit - yea, copy paste error. I'll fix.

On adding string to i18n list - what does that mean exactly / how do I do that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind Dave said we didn't need to worry about it here.

</label>
<PilotExperiment
value={this.state.pilotExperiment}
onChange={e => this.setState({pilotExperiment: e.target.value})}
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if visible was set and then you start typing in a pilot experiment?

Copy link
Author

Choose a reason for hiding this comment

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

The same thing happens - the checkbox gets greyed out, and then it's set as not visible. The behavior should be the same as what's on the script edit UI.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok I see it now.

Copy link
Contributor

@dmcavoy dmcavoy left a comment

Choose a reason for hiding this comment

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

LGTM - @davidsbailey you want to take a look now?

Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

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

Looks good!

@uponthesun
Copy link
Author

I did a small refactor to reduce code and test duplication, which also switched the order of the fields slightly for both the script and course edit UI. (See pictures in updated description.)

@uponthesun uponthesun merged commit 7d7f24e into staging May 1, 2020
@uponthesun uponthesun deleted the add-visible-stable-course-edit-ui branch May 1, 2020 17:22
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.

None yet

3 participants