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

ProgressTableDetailCell - progress table refactor #38859

Merged
merged 7 commits into from
Feb 4, 2021

Conversation

maureensturgeon
Copy link
Contributor

@maureensturgeon maureensturgeon commented Feb 2, 2021

This is a rewrite of the ProgressBubbleSet a combined effort between @cforkish and @maureensturgeon, and was extracted from the full refactor work in #38309.

There are also updates to progressTestHelpers to help with data set-up for the unit tests for the ProgressTableDetailCell and for future progress table components.

The unit tests were PR'd previously: #38598

Detail cell:
Screen Shot 2021-02-02 at 9 38 05 AM

You can refer to this tech spec to see how this component fits into the full table architecture.

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • 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

@maureensturgeon maureensturgeon marked this pull request as ready for review February 2, 2021 17:43
@maureensturgeon maureensturgeon requested review from a team and jamescodeorg February 2, 2021 17:43
@maureensturgeon maureensturgeon force-pushed the maureen/LP-1672-progress-table-detail-cell branch from 9cc1da6 to ed8aea1 Compare February 2, 2021 19:52
Copy link
Contributor

@jamescodeorg jamescodeorg left a comment

Choose a reason for hiding this comment

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

Sorry, I only got partway through this review and won't be able to make more progress tonight. I'm sending out my initial comments in case you want to get a head start on thinking about some of them.

apps/src/templates/progress/progressHelpers.js Outdated Show resolved Hide resolved
LevelStatus.submitted,
LevelStatus.free_play_complete,
LevelStatus.completed_assessment,
LevelStatus.readonly
Copy link
Contributor

Choose a reason for hiding this comment

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

For my education, when does the status of a level get set to LevelStatus.readonly?

Copy link
Contributor

Choose a reason for hiding this comment

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

through the "manage locking" ux for assessments and surveys. it means the student can view the assessment but not edit it (as opposed to "locked", which doesn't allow student to view at all).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see. Is it possible for a read-only assessment to not be completed? Or do we always want to show a read-only assessment as being completed?

Copy link
Contributor

Choose a reason for hiding this comment

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

that's a good question, but one for amanda. the scope of this work was intended to achieve feature parity with our existing tables, so unless things looked broken i tried not to change the design at all. but read-only is "complete" in the sense that the student can't do anything more with it, so maybe the "complete-colored" part of the box is intended to show how much of the lesson is "done" rather than "complete"?

apps/src/templates/progress/progressHelpers.js Outdated Show resolved Hide resolved
apps/src/templates/progress/progressTypes.js Show resolved Hide resolved
}
};
export default class ProgressTableDetailCell extends React.Component {
static widthForLevels(levels) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this called from?

Copy link
Contributor

Choose a reason for hiding this comment

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

ProgressTableDetailView, which needs to pass an array of explicit column widths into ProgressTableContentView. we have not yet opened a PR for either of those components though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I'll take your word for it. :-)

Copy link
Contributor

@jamescodeorg jamescodeorg left a comment

Choose a reason for hiding this comment

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

Exciting to see this come together! I left some cosmetic comments, up to your discretion.

apps/src/templates/progress/progressHelpers.js Outdated Show resolved Hide resolved
apps/src/templates/progress/progressHelpers.js Outdated Show resolved Hide resolved
}
};
export default class ProgressTableDetailCell extends React.Component {
static widthForLevels(levels) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I'll take your word for it. :-)

(pageResult && levelProgressFromResult(pageResult)) ||
levelProgressWithStatus(LevelStatus.not_tried)
)
: null
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double checking -- do we prefer null or [] (or possibly both depending on the scenario) here?

Copy link
Contributor

Choose a reason for hiding this comment

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

we need it to be null because we use the presence (or absence) of that property to distinguish multi-page assessments from single-page assessments. i added this comment in #38712 in response to a similar question from Maureen, so i'm not going to re-add it here

 // `pages` is used by multi-page assessments, and its presence
 // (or absence) is how we distinguish those from single-page assessments

apps/src/templates/progress/progressHelpers.js Outdated Show resolved Hide resolved
apps/src/templates/progress/progressHelpers.js Outdated Show resolved Hide resolved
@cforkish cforkish merged commit e54a2a6 into staging Feb 4, 2021
@cforkish cforkish deleted the maureen/LP-1672-progress-table-detail-cell branch February 4, 2021 00:02
@cforkish cforkish added the student progress PRs related to student progress label Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
student progress PRs related to student progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants