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

Update assignable launch #2253

Merged
merged 11 commits into from
Jun 17, 2024
Merged

Update assignable launch #2253

merged 11 commits into from
Jun 17, 2024

Conversation

TomWoodward
Copy link
Member

@TomWoodward TomWoodward commented Jun 10, 2024

https://openstax.atlassian.net/browse/DISCO-14

adds token parsing for assignable integration and textSize support from the assignable nav. integrates with changes from https://github.com/openstax/assignments/compare/main...text-resizer?expand=1

@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 10, 2024 19:28 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 11, 2024 14:39 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 11, 2024 14:53 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 11, 2024 16:43 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 11, 2024 16:47 Inactive
@TomWoodward TomWoodward marked this pull request as ready for review June 11, 2024 16:48
@TomWoodward TomWoodward requested a review from a team as a code owner June 11, 2024 16:48
@TomWoodward TomWoodward requested a review from RoyEJohnson June 11, 2024 16:48
Copy link
Member

@jivey jivey 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, just left a few questions to better my understanding.

src/app/content/components/AssignedTopBar.spec.tsx Outdated Show resolved Hide resolved

jest.mock('react', () => {
const react = (jest as any).requireActual('react');
return { ...react, useEffect: react.useLayoutEffect };
Copy link
Member

Choose a reason for hiding this comment

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

I see that swapping this makes it synchronous, but I can't tell why at a glance. Is act not sufficient?

Copy link
Member Author

Choose a reason for hiding this comment

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

its possible that newer versions of react or the testing library don't have this problem, but there are a few places in the rex code that do this. the react issue is here facebook/react#14050 (comment)

@@ -39,21 +42,60 @@ const StyledSectionTitle = styled.h2`
`)}
`;

declare const window: any;
Copy link
Member

Choose a reason for hiding this comment

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

I don't notice any custom properties so it seems like you wouldn't need it this.... maybe prerendering related?

Copy link
Member Author

Choose a reason for hiding this comment

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

looks like an artifact of an earlier age

@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 13, 2024 21:40 Inactive
export const pullToken = (window: Window) => {
const searchParams = new URLSearchParams(window.location.search);

const launchToken = searchParams.get('t') ?? undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

The ?? branch seems pointless.

Copy link
Member Author

Choose a reason for hiding this comment

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

you're right, the conditional below catches it either way

@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 14, 2024 10:55 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 14, 2024 11:31 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-update-assignab-fohjm9 June 17, 2024 19:02 Inactive
@TomWoodward TomWoodward merged commit 1580b99 into main Jun 17, 2024
7 of 9 checks passed
@TomWoodward TomWoodward deleted the update-assignable-launch branch June 17, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants