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

Move undo & save buttons in top-level header #435

Merged
merged 8 commits into from
Oct 29, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Oct 28, 2024

Description

Moves the undo & save buttons in the top-level header of the Workflow Details page. In order to do this, a lot of the state scoped within WorkflowInputs had to be lifted up the dependency tree, in order to be accessible in the header component, where the buttons were relocated to. The majority of this PR is just refactoring the state and related props to/from the parent/child components.

Other notable changes include:

  • adding the save/undo buttons to the TopNavMenu so they are visible when useNewHomePage : true
  • fixing an endless loop bug in the test utils that was throttling the tests. By moving some of this state in WorkflowDetails, it actually would timeout and the tests would fail. After optimizing, there is no unnecessary rendering happening
  • moves CONFIG_STEP as a consumable global constant to be accessed by all child components

Screenshots:
Screenshot 2024-10-28 at 5 12 07 PM

Screenshot 2024-10-28 at 5 13 07 PM

Screenshot 2024-10-28 at 5 13 18 PM

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.

@ohltyler ohltyler marked this pull request as ready for review October 29, 2024 00:14
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler ohltyler merged commit d4123fa into opensearch-project:main Oct 29, 2024
7 checks passed
@ohltyler ohltyler deleted the move-save-btns branch October 29, 2024 15:34
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-flow-framework/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-flow-framework/backport-2.x
# Create a new branch
git switch --create backport/backport-435-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d4123fa9d057f4dcb834115c5599a6c8f0044259
# Push it to GitHub
git push --set-upstream origin backport/backport-435-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-flow-framework/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-435-to-2.x.

@ohltyler
Copy link
Member Author

Will wait for #434 to merge and then retry backport.

ohltyler added a commit to ohltyler/dashboards-flow-framework that referenced this pull request Oct 29, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 29, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit d4123fa)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ohltyler pushed a commit that referenced this pull request Oct 29, 2024
(cherry picked from commit d4123fa)

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

2 participants