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

Make New Workflow page functional #102

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Mar 1, 2024

Description

This PR makes the New Workflow page functional via the following changes:

  • updates the initial workflow cards to match the mocks
  • adds a search bar to search by workflow card title
  • makes the card's Go button functional and navigate to the workflow details page with pre-filled data
  • workflow caching via redux store to persist the selected new workflow across pages (in this case going from New Workflow page -> Workflow Details page)

Changes on the Workflow Details page to support the navigation from New Workflow page:

  • include a new constant in the URL and process it to determine if the context of the page is a new workflow, or some existing/indexed workflow
  • if refresh is done on an unsaved/new workflow, use the default name
  • fetching of a cached workflow in the case of it being a new/unsaved workflow
  • browser blocking logic to warn users before navigating away from the page, if the context is either 1/ a new unsaved/un-indexed workflow, or 2/ isDirty is true, indicating changes from some existing/indexed workflow. This is triggered on page refresh/page close and functionality is native to the browser.

Other minor changes:

  • updates Workflow data model to have more optional params, in the case of a new/unsaved workflow
  • minor dynamic loading improvements based on redux loading field

Demo video showing:

  • search filtering of preset workflows
  • selecting preset workflow and caching the selection
  • navigating to workflow details page (name changed to snake_case) and fetching cached selection
  • refresh with warning modal in browser (not visible)
  • refresh to show the default new_workflow name
  • refreshing on existing workflow reloads the data
screen-capture.15.webm

Issues Resolved

Resolves #71
Leaving #72 open until a preset workflow library is available from the backend.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler ohltyler added the rapid label Mar 4, 2024
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.30%. Comparing base (1690766) to head (673cc8e).

❗ Current head 673cc8e differs from pull request most recent head c637376. Consider uploading reports for the commit c637376 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   17.41%   19.30%   +1.89%     
==========================================
  Files          49       50       +1     
  Lines         695      746      +51     
  Branches       63       71       +8     
==========================================
+ Hits          121      144      +23     
- Misses        569      595      +26     
- Partials        5        7       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ohltyler ohltyler merged commit 2d176f0 into opensearch-project:main Mar 4, 2024
5 of 8 checks passed
@ohltyler ohltyler deleted the create-tab branch March 4, 2024 21:27
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 4, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 2d176f0)
ohltyler added a commit that referenced this pull request Mar 4, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 2d176f0)

Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New workflow] Build the base UI components
2 participants