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

clean up workflow actions #2136

Merged
merged 5 commits into from
Jun 4, 2024
Merged

clean up workflow actions #2136

merged 5 commits into from
Jun 4, 2024

Conversation

rossedfort
Copy link
Contributor

@rossedfort rossedfort commented Jun 3, 2024

Description & motivation 💭

Refactor some confusing code in workflow-actions.svelte

  • For Terminate, Cancel, and Signal the criteria for whether a user can perform these actions are simple - in OSS, are Namespace write actions disabled globally via environment variables, or is the individual action disabled via an environment variable. in Cloud, does the user have more than read-only access to the namespace.
  • For Reset, there are 2 additional checks - does the workflow have any pending children, and are there any Activity Task Started/Completed/TimedOut events.

This is mostly just renaming some stuff for clarity, and removed a bit of duplicate logic. Now the correct tooltip should be displayed on the reset button when a user doesn't have write access to the namespace.

Also don't render the Modals unless the action is enabled

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

Issue(s) closed

Docs

Any docs updates needed?

Copy link

vercel bot commented Jun 3, 2024

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 Jun 3, 2024 9:14pm

@rossedfort rossedfort merged commit 9616d0e into main Jun 4, 2024
10 checks passed
@rossedfort rossedfort deleted the clean-up-workflow-actions branch June 4, 2024 15:31
Alex-Tideman pushed a commit that referenced this pull request Jun 6, 2024
* clean up workflow actions

* better i18n string name

* fix batch action checks

* fix tests

* add integration tests
Alex-Tideman added a commit that referenced this pull request Jun 6, 2024
* Add config and command to run local temporal server, remove versioning on workflow worker tab, add link to task queue, add tabs for workers/versioning on task queue page. Add view all assignment rules row

* send resetType in request body for batch reset (#2110)

* send resetType in req body for batch reset

for compatibility with older server/api versions

* default reset type to first, clear up reason hint text

* 2.27.4 (#2111)

Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>

* remove import from protos, use custom enum (#2112)

* 2.27.5 (#2113)

Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>

* Remove copyable tooltip (#2114)

* Fix issue where close button cannot be seen on dark drawers (#2115)

* Fix issue where close button cannot be seen on dark drawers

* Update drawer.stories.svelte

* Update drawer.stories.svelte

* DT-2159 - fix "Reapply Signals" checkbox on reset workflow confirmation form (#2117)

* use binding instead of on:change for reset reapply checkbox

* add regression integration test

* Night mode audit (#2118)

* Update and consolidate surface colors

* Update text colors

* Update border colors

* Update shadow colors

* Remove unnecessary colors

* Fix box shadow color

* Use ring instead of box shadow

* Update WorkflowStatus colors

* Fix simple TableHeaderRow

* Input updates based on designs

* Fix table headers and various text and bg colors

* Update button styles to match designs

* Remove disabled color variables, update placeholder text and update Pill component

* Update checkbox and radio input

* Update toggle switch

* Update IconButton to use Button component

* Remove unnecessary badge background

* Update Toast component colors

* Update snaps and fix errors

* Remove unnecessary surface-input

* Update page background color to match designs

* Update timeline background and text color

* Remove underline on button links

* Remove ternary and use and instead for active class

* Delete snapshot tests

* Kebab case colors

* Keep Button border as 2px on focus

* Add caret-danger to plugin

* 2.27.6 (#2122)

Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>

* Add local-temporal command (#2120)

* Update SideNavigation component  (#2124)

* Update side nav focus styles

* Update heart beat indicator color

* Update version.go to v2.27.2 (#2126)

* Link to namespace in Namespace sticky nav (#2123)

* Add href prop to combobox for link button

* Subtle border, better path, disable link if no namespace

* add docs to side nav (#2131)

* add filtering to api pagination (#2130)

* DT-2179 - fix wf reset button & other fixes (#2133)

* missed PR feedback

- fix ApiPagination prop typing and name
- add search icon to input in ApiPagination

* fix workflow reset button disabled logic

* move docs link

* use cloud guard

* Add timezoneName to schedule spec with default of UTC (#2127)

* Add timezoneName to schedule spec with default of UTC

* Use translate for timezones

* Set input on edit

* Add onDecode prop

* 2.27.7 (#2134)

Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>

* Audit a11y issues (#2135)

* DT-2134 Fix a11y issues with accordion.svelte

* Remove on:keydown on CodeBlock

I could not find a single use of `CodeBlock` that had an on:keydown event. [Related ticket](https://temporalio.atlassian.net/browse/DT-2135).

* Update filter-or-copy-buttons.svelte

These both appear to be `noop` functions?

* clean up workflow actions (#2136)

* clean up workflow actions

* better i18n string name

* fix batch action checks

* fix tests

* add integration tests

* 2.27.8 (#2137)

Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>

* Update workflow status colors (#2132)

* Update running color

* Update scheduled color

* Update completed and open color

* Update new and initiated color

* Use globalThis.accessToken() for codec server calls (#2138)

* Fix api pagination alignment, add debounce as a prop (#2139)

* fix alignment of api pagination slots

* fix

* fix slot check

* add debounce as  a prop

* spelling

* fix debounce

* remove loading slot prop

* 2.27.9 (#2140)

Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>

* Fix header colors

* Update snaps?

* Remove commented out mock, better check for rules

* Remove dup .env

---------

Co-authored-by: Ross Edfort <rossedfort@gmail.com>
Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>
Co-authored-by: Steve Kinney <hello@stevekinney.net>
Co-authored-by: Laura Whitaker <laura.whitaker@temporal.io>
Co-authored-by: Grace Iris Gardner <42048868+GraceGardner@users.noreply.github.com>
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