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

Edit viz in a dialog #351

Merged
merged 5 commits into from
Oct 21, 2024
Merged

Conversation

ruanyl
Copy link
Member

@ruanyl ruanyl commented Oct 16, 2024

Description

[Describe what this change achieves]

Screen.Recording.2024-10-16.at.18.02.45.mov

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test.
  • New functionality has user manual doc added.
  • 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.

public/components/visualization/text2viz.scss Outdated Show resolved Hide resolved
Comment on lines +181 to +182
setInputQuestion(JSON.parse(savedVis.uiState ?? '{}').input ?? '');
setCurrentInstruction(JSON.parse(savedVis.uiState ?? '{}').instruction ?? '');
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to add try catch here in case uiState is invalid json?

Copy link
Member Author

Choose a reason for hiding this comment

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

The exception should be handled by the .catch

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
@ruanyl ruanyl merged commit 6a49d78 into opensearch-project:main Oct 21, 2024
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 21, 2024
* feat: supporting edit visualization with input from a dialog

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: save instruction input

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: change internal error to bad request

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: use sass variable for 12px font size

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* add CHANGELOG

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
(cherry picked from commit 6a49d78)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ruanyl pushed a commit that referenced this pull request Oct 22, 2024
* feat: supporting edit visualization with input from a dialog

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: save instruction input

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: change internal error to bad request

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: use sass variable for 12px font size

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* add CHANGELOG

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
(cherry picked from commit 6a49d78)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

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
Labels
backport 2.x Trigger the backport flow to 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants