Skip to content

Conversation

adamstankiewicz
Copy link
Member

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

})),
},
];
if (!isOpen) {
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] It's OK to render the ProductTour component itself because each tour itself has the enabled: boolean flag, which is also set to isOpen. Then, CheckpointOverlay appears to return null as well if there's no rect, so rendering both CheckpointOverlay and ProductTour here irrespective of isOpen should be a no-op.

return (
<>
<CheckpointOverlay target={`#${targetSelector}`} />
<CheckpointOverlay target={targetSelector} />
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] Ensuring we always include # when defining selectors, since the selector is intended to semantically include the #.

Comment on lines -10 to -13
jest.mock('@edx/frontend-platform/i18n', () => ({
FormattedMessage: ({ defaultMessage }) => defaultMessage,
defineMessages: (messages) => messages,
}));
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] Unnecessary to mock.


const mockOnAdvance = jest.fn();

const targets = ['#step-1', '#step-2', '#step-3', '#step-4'];
Copy link
Member Author

Choose a reason for hiding this comment

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

[inform] the list of targets is never iterated over, and so we can simply use the explicit selectors where needed without needing to do any transforming to replace the #.

Base automatically changed from kiram15/ENT-10219 to master June 24, 2025 18:44
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.

2 participants