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
ProgressTableLessonNumber #38215
ProgressTableLessonNumber #38215
Conversation
5c3c4bb
to
67d8abf
Compare
c8923bc
to
3305ff5
Compare
3305ff5
to
f329166
Compare
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.
LGTM. I think the detail that you included in the PR description about why the tooltip is rendered in the component is important and should probably included in comments in the code somewhere?
it('renders the name in the tooltip', () => { | ||
const wrapper = setUp(); | ||
const tooltipComponent = wrapper.find(ReactTooltip); | ||
expect(tooltipComponent.contains(DEFAULT_PROPS.name)).to.equal(true); |
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.
I think this can be written as to.be.true
.
@jamescodeorg personally i think that detail is important only to explain why that's in the diff. the previous implementation needed to include a comment (here) about rebuilding tooltips since they weren't rendered by the components that used them, but imo including the tooltip in the component that uses it is intuitive and needs no explanation. don't you think it would be a little weird to see a comment like this?
happy to add it though if you think it's helpful. |
Heh, ok, point taken. I was thinking that it might be good to note that it's important to have the tooltip be rendered with the component for performance reasons but if it's the usual thing to do, then agree we don't need the comment. (Which makes me wonder, why did we do it the other way before?) |
this PR represents a combined effort between @cforkish and @maureensturgeon, and was extracted from the full refactor work in #38309.
this is a refactored version of
SectionProgressLessonNumberCell
for use in the refactored progress tables. the primary difference in this version is to render the tooltip directly in this component, which prevents us from having to re-render all tooltips when the table is scrolled.you can refer to this tech spec to see how this component fits into the full table architecture.