8000 [DT-6] Add Local Activity to event history filter by laurakwhit · Pull Request #1390 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[DT-6] Add Local Activity to event history filter #1390

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

Conversation

laurakwhit
Copy link
Contributor

Description & motivation 💭

  • Adds a Local Activity to
    • the Workflow Events filter in event History view
    • the Event Type filter in event Compact view
  • Clears the filter when switching from History view to Compact view if the filter option does not exist

Screenshots (if applicable) 📸

History view Compact view
Screenshot 2023-05-25 at 5 45 39 PM Screenshot 2023-05-25 at 5 45 49 PM

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added updated

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

  • Verify the Local Activity option* works as expected in the
    • History view
    • Compact view
  • Verify LocalActivity events also show up when filtering for Marker events in the History view
  • Verify when changing from the History to Compact view
    • If the filter option exists it is persisted
    • If the filter option does not exist the filter is cleared

*A sample with LocalActivity events can be found here.

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

  • DT-6

Docs

Any docs updates needed?

@vercel
Copy link
vercel bot commented May 25, 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) May 31, 2023 4:06pm

@@ -142,7 +150,10 @@ describe('Event Category Data Structures', () => {
});
});

const categories: Record<EventTypeCategory, EventType[]> = {
const categories: Record<
Exclude<EventTypeCategory, 'local-activity'>,
8000 Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've opted not to touch any of the logic in getEventCategory, etc. (and just omit the category here), but if we want to be categorizing events as LocalActivity, outside of just filtering for them, we may want to revisit this.

@@ -32,7 +32,8 @@
value: _value,
url: $page.url,
}).then((v) => {
_value = v?.toString() ?? null;
const hasOption = options.find(({ option }) => option === v);
_value = hasOption ? v?.toString() ?? null : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Slightly confusing here... Why not use hasOption.toString()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely not ideal with that nested logic 😅 Updated to 👇

      const visibleOption = options.find(({ option }) => option === v);
      _value = visibleOption?.option?.toString() ?? null;

@laurakwhit laurakwhit requested a review from Alex-Tideman May 31, 2023 15:23
@Alex-Tideman
Copy link
Contributor

Looks like you gotta update that unit test for those new options.

@laurakwhit laurakwhit merged commit d77b923 into main May 31, 2023
@laurakwhit laurakwhit deleted the DT-6-Add-a-LocalActivity-filter-in-the-event-history-filter branch May 31, 2023 16:39
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