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

DM-43461: Enable background page recomputation in Times Square #163

Merged
merged 12 commits into from
Apr 11, 2024

Conversation

jonathansick
Copy link
Member

@jonathansick jonathansick commented Mar 27, 2024

  • Add TimesSquareParametersProvider. This context and provider lets us wrap up the concerns around taking URL path and query parameters and breaking those down into the Times Square API URL, notebook parameters, and display settings. This dramatically simplifies the page components and lets us reuse code between the regular and github-pr pages. It also lets us avoid prop drilling to pass this info to the several components that consume this info.
  • Add TimesSquareHtmlEventsProvider. This context and provider gives access to the Times Square /v1/pages/:page/html/events?{param} server-sent events endpoint.
  • Add button that sends a DELETE /v1/pages/:page/html?{param} request.

Copy link

changeset-bot bot commented Mar 27, 2024

🦋 Changeset detected

Latest commit: 72dd989

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
squareone Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

jonathansick added a commit to lsst-sqre/phalanx that referenced this pull request Mar 27, 2024
This update affects the Times Square UI and adds a "recalculate" button.

lsst-sqre/squareone#163
This context and provider lets us wrap up the concerns around taking URL
path and query parameters and breaking those down into the Times Square
API URL, notebook parameters, and display settings.

This dramatically simplifies the page components and lets us reuse code
between the regular and github-pr pages.

It also lets us avoid prop drilling to pass this info to the several
components that consume this info.

Additionally, the Times Square hooks, like useTimesSquarePage and
useHtmlStatus use this context so that, again, individual pages don't
need to pass additional arguments based on the URL parameters.
This solves the problem of the parameters form being blank when
navigating back to a page.
This package provides a client for server-sent events with a fetch-like
API.
This new field is available in Times Square API 0.11.0. Its the URL of
the html/events server-sent events endpoint.
This context provider has a useEffect hook that uses fetch-event-source
to get the server-sent event from the Times Square
/pages/:page/html/events endpoint. Components can use this context to
get real-time updates on the HTML for a page instance and the status of
the rendering.
This may help with the storybook issue for squared and the
GafaelfawrUserMenu.

storybookjs/storybook#24194
This should make it clearer what the reset button does.

We really want a "lighter" or "darker" version of the red here; but
let's try just manipulating opacity for now.
This shows the execution status, including the age of the execution and
execution duration if available.

It's also where we put the button to request a recomputation of an
existing page.

The component's data is populated by the TimesSquareHtmlEventsContext.
We show how to mock the context in Storybook to design different states.
@jonathansick jonathansick marked this pull request as ready for review April 11, 2024 15:00
@jonathansick jonathansick merged commit 482ee35 into main Apr 11, 2024
12 checks passed
@jonathansick jonathansick deleted the tickets/DM-43461 branch April 11, 2024 15:04
@squareone-ci squareone-ci bot mentioned this pull request Mar 22, 2024
jonathansick added a commit to lsst-sqre/phalanx that referenced this pull request Apr 11, 2024
This update affects the Times Square UI and adds a "recalculate" button.

lsst-sqre/squareone#163
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.

1 participant