8000 Add Timeline view with labs guard by Alex-Tideman · Pull Request #1445 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Timeline view with labs guard #1445

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

Merged
merged 2 commits into from
Jun 21, 2023
Merged

Conversation

Alex-Tideman
Copy link
Contributor
@Alex-Tideman Alex-Tideman commented Jun 20, 2023

Description & motivation 💭

Add new Timeline view hidden behind labs flag.

To turn on, set labs=true as a query param on the Workflow Details page. That will set a localStorage flag to true so you don't have to keep adding the param. To turn off, set labs=false.

Screenshots (if applicable) 📸

Screen Shot 2023-06-20 at 9 57 42 AM

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@Alex-Tideman Alex-Tideman requested review from stevekinney, rossedfort and a team as code owners June 20, 2023 15:24
@vercel
Copy link
vercel bot commented Jun 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
holocene ⬜️ Ignored (Inspect) Visit Preview Jun 21, 2023 4:23pm

@Alex-Tideman Alex-Tideman requested a review from laurakwhit June 20, 2023 15:25
@@ -0,0 +1,3 @@
import { persistStore } from './persist-store';

export const labsMode = persistStore('labsMode', false, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nice if we could do something like this

const labsParam = derived([page], ([$page]) =>
  $page.url.searchParams.get('labs'),
);

const updateLabsMode: StartStopNotifier<boolean> = (set) => {
  return labsParam.subscribe((labs) => {
    if (labs === 'true') {
      set(true);
    } else if (labs === 'false') {
      set(false);
    }
  });
};

with the persistStore so we don't have to be on the same page where the LabsModeGuard is to update the setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I was contemplating that. The only issue is if someone adds ?labs=true on a page that doesn't have a LabsGuard, they might expect the page to change.

But I think that's okay, I like this better than needing to be on a LabsGuard page

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I'm going to leave it as is, adding a StartStopNotifier to the persistStore overrides the custom updater function that sets localStorage.

I can move this logic out of the LabsModeGuard and to the top level layout, but for now I want to keep it isolated to the guard. We can revisit as we add more labs.

@Alex-Tideman Alex-Tideman merged commit b168d0a into main Jun 21, 2023
@Alex-Tideman Alex-Tideman deleted the workflow-timeline-with-labs-mode branch June 21, 2023 16:31
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
0