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

remove ui settings client-side validation #100311

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented May 19, 2021

Summary

Fix #83038

Remove the uiSettings legacy client-side validation

Checklist

@pgayvallet pgayvallet added Feature:uiSettings release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.14.0 labels May 19, 2021
@pgayvallet pgayvallet marked this pull request as ready for review May 19, 2021 10:28
@pgayvallet pgayvallet requested a review from a team May 19, 2021 10:28
@pgayvallet pgayvallet requested a review from a team as a code owner May 19, 2021 10:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

},
schema: schema.string({
validate: (value) => {
if (!/^\d+[mg][b]$/i.test(value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should test the value is a valid ByteSize ?

export class ByteSizeType extends Type<ByteSizeValue> {

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Kibana app changes LGTM, validation for invalid JSON still works.

Can someone elaborate on why we are removing this from the client? It seems like useful UX because the user sees right away their input is invalid instead of trying to click an enabled save button which will cause an error.

The linked issue is pretty light on details.

I don't have a strong opinion on this - as you mentioned it's not used much anyway.

@mshustov
Copy link
Contributor

Can someone elaborate on why we are removing this from the client? It seems like useful UX because the user sees right away their input is invalid instead of trying to click an enabled save button which will cause an error.

@flash1293 The client-side validation is not used for UI settings set via HTTP endpoints and kibana.yml, so we switched to the server-side validation. To avoid the situation when you have to keep the validation in sync for the client and server-side, we decided to remove the client-side validation, since UI can rely on the server-side validation.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
core 998 984 -14

Async chunks

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

id before after diff
advancedSettings 913.5KB 912.7KB -830.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
core 29 26 -3
Unknown metric groups

API count

id before after diff
core 2207 2187 -20

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 22 20 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 261 149 -112
lens 67 45 -22
licensing 18 15 -3
maps 286 208 -78
ml 121 115 -6
monitoring 109 56 -53
stackAlerts 101 95 -6
total -295

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pgayvallet pgayvallet merged commit 8ee78d3 into elastic:master May 20, 2021
pgayvallet added a commit to pgayvallet/kibana that referenced this pull request May 20, 2021
* remove ui settings client-side validation

* fix linter

* fix tests

* update generated doc
pgayvallet added a commit that referenced this pull request May 20, 2021
* remove ui settings client-side validation

* fix linter

* fix tests

* update generated doc
yctercero pushed a commit to yctercero/kibana that referenced this pull request May 25, 2021
* remove ui settings client-side validation

* fix linter

* fix tests

* update generated doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:uiSettings release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove UiSettings client side validation
5 participants