Skip to content

Comments

[ES|QL Editor] Attempt to fix resetting of edits after a query was submitted#210638

Closed
kertal wants to merge 4 commits intoelastic:mainfrom
kertal:discover-research-esql-reset
Closed

[ES|QL Editor] Attempt to fix resetting of edits after a query was submitted#210638
kertal wants to merge 4 commits intoelastic:mainfrom
kertal:discover-research-esql-reset

Conversation

@kertal
Copy link
Member

@kertal kertal commented Feb 11, 2025

Summary

Attempting to fix #192950

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@elasticmachine
Copy link
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

@kertal
Copy link
Member Author

kertal commented Feb 11, 2025

/ci

@kertal kertal self-assigned this Feb 11, 2025
@kertal kertal added Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Team:ESQL ES|QL related features in Kibana t// labels Feb 11, 2025
@kertal
Copy link
Member Author

kertal commented Feb 11, 2025

/ci

@kertal kertal changed the title [ES|QL Editor] Attempt to fix resetting od edits after a query was submitted [ES|QL Editor] Attempt to fix resetting of edits after a query was submitted Feb 11, 2025
@stratoula
Copy link
Contributor

@kertal this seems a bad solution to me:

  • I think it complicates the editor state even more
  • I am expecting bugs with this change

Also there is already

const [codeWhenSubmitted, setCodeStateOnSubmission] = useState(code);

so this change makes it even more confusing.

@kertal
Copy link
Member Author

kertal commented Feb 12, 2025

const [codeWhenSubmitted, setCodeStateOnSubmission] = useState(code);

so this change makes it even more confusing.

Absolutely, it's already there 🤦 , didn't see the forest for the trees ! no reason to add another state, let me give this another try ...

@kertal
Copy link
Member Author

kertal commented Feb 12, 2025

/ci

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 847.6KB 847.8KB +137.0B

History

cc @kertal

@kertal
Copy link
Member Author

kertal commented Jun 18, 2025

closing in favor of #223394

@kertal kertal closed this Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Team:ESQL ES|QL related features in Kibana t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESQL Editor: Query gets overwritten when changed while loading

3 participants