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

Dt 1142 deep linking activities #1659

Closed
wants to merge 37 commits into from

Conversation

GraceGardner
Copy link
Contributor

@GraceGardner GraceGardner commented Oct 2, 2023

Description & motivation 💭

Adds :

  • deep linking to workflow events
  • page handler to bottom pagination buttons

Screenshots (if applicable) 📸

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

  • Allow multiple rows to open at once with click. Remove ArrowUp/ArrowDown functionality that auto-opens rows and prevents multiple rows at once from being open.

Issue(s) closed

DT-1142
https://temporalio.atlassian.net/browse/DT-1142

Docs

Any docs updates needed?

@GraceGardner GraceGardner requested review from rossedfort and a team as code owners October 2, 2023 18:12
@vercel
Copy link

vercel bot commented Oct 2, 2023

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

Name Status Preview Comments Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2023 3:59pm

laurakwhit and others added 9 commits October 4, 2023 13:24
* Add Not equal to option for text filter

* Update and refactor getFocusedElementId
* Make copyable UI similar to copy button in CodeBlock

* Fix truncation in links without icons

* Update snap

* Create CopyButton component
* Convert backticks to single quotes

* Format files
* Add event filters, lock view from start to end

* Make it better with tooltips, collapse vertical, event filters, label improvements

* Don't follow mouse

* Add togglebuttons group, add displayName to group, cleanup

* Add Timeline to Accordion, use start/endOfMinute for min/max to provide a little zoomout ability to see all events

* Remove paginated-table changes

* Update snapshots and pass testid

* Fix float tests

* Remove event type filter in timeline

* Add types

* Fix strings to single quotes
* Add aria-hidden to icon svg if no title provided

* Remove default icon and label for IconButton

* Update snaps

* Update test
Co-authored-by: Temporal Data (cicd) <[email protected]>

export let eventGroup: EventGroup;
export let selectedId: string;
export let onGroupClick: (id: string) => void;

const handleGroupClick = (id: string) => {
const { namespace, workflow, run } = $page.params;
Copy link
Member

Choose a reason for hiding this comment

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

We can probably just store these variables in the top-level instead of fetching them every time.

const handleGroupClick = (id: string) => {
const { namespace, workflow, run } = $page.params;
const queryParams: Record<string, string> = {};
$page.url.searchParams.forEach((value, key) => {
Copy link
Member

Choose a reason for hiding this comment

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

Why not just use a reduce? This can probably be broken out into a utility function and unit tested. Now that I think about it, that's probably true for this entire function.

timeline.fit();

if ($page.url.hash) {
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Why are we using a setTimeout here?

@@ -61,6 +65,19 @@

const onLinkClick = () => {
expanded = !expanded;
// Dont delete query params like ?per-page
const { namespace, workflow, run } = $page.params;
const queryParams: Record<string, string> = {};
Copy link
Member

Choose a reason for hiding this comment

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

Yea, if we're doing this more than once, then we should definitely break it out.

@@ -54,6 +74,9 @@
sort: compact ? 'ascending' : sort,
});
loading = false;
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

The setTimeout here feels a little bit like a code smell.

hash = $page.url.hash;
});

function scrollIntoView(target, eventHistory) {
Copy link
Member

Choose a reason for hiding this comment

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

This should be broken out.

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.

4 participants