-
Notifications
You must be signed in to change notification settings - Fork 894
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
[Discover] UI Updates to Dataset Configurator #8166
[Discover] UI Updates to Dataset Configurator #8166
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8166 +/- ##
==========================================
- Coverage 60.95% 60.94% -0.01%
==========================================
Files 3758 3759 +1
Lines 89288 89330 +42
Branches 13970 13977 +7
==========================================
+ Hits 54422 54441 +19
- Misses 31478 31491 +13
- Partials 3388 3398 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The time field selector should be disabled no matter what for index patterns. So even if they have an index pattern where they have selected no time field, this should not let the user edit it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just lemme know if my functional logic makes sense.
@@ -97,7 +110,20 @@ export const Configurator = ({ | |||
> | |||
<EuiFieldText disabled value={dataset.title} /> | |||
</EuiFormRow> | |||
{timeFields && timeFields.length > 0 && ( | |||
{dataset.type === DEFAULT_DATA.SET_TYPES.INDEX_PATTERN && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here reads wrong. Correct me if my understanding is wrong but shouldnt the logic be like this:
if(languageService.getLanguage(language)?.disableDatePicker) {
return null
}
if(dataset.type === DEFAULT_DATA.SET_TYPES.INDEX_PATTERN) {
return DisabledInput
} else {
return Select
}
@@ -100,6 +100,7 @@ export class QueryEnhancementsPlugin | |||
editor: enhancedSQLQueryEditor, | |||
editorSupportedAppNames: ['discover'], | |||
supportedAppNames: ['discover', 'data-explorer'], | |||
disableDatePicker: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Yeah lets flip the order! |
5ac9360
to
51e4490
Compare
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
51e4490
to
57c3d12
Compare
Signed-off-by: Sean Li <[email protected]>
value: field.name, | ||
})), | ||
{ text: '-----', value: '-----', disabled: true }, | ||
{ text: noTimeFilter, value: noTimeFilter }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is fine but it's better to separate them, since text
can change (e.g. different translation, future UX wording update), and value
should not change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Sean Li <[email protected]>
value: field.name, | ||
})), | ||
{ text: '-----', value: '-----', disabled: true }, | ||
{ text: noTimeFilter, value: noTimeFilter }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
* adding UI changes Signed-off-by: Sean Li <[email protected]> * addressing comments Signed-off-by: Sean Li <[email protected]> * fixing more bugs, adding no time field prop for unsupported languages Signed-off-by: Sean Li <[email protected]> * addressing comments Signed-off-by: Sean Li <[email protected]> * addressing comments Signed-off-by: Sean Li <[email protected]> * Changeset file for PR #8166 created/updated * adressing comments, renaming label Signed-off-by: Sean Li <[email protected]> * addressing comments, adding tests Signed-off-by: Sean Li <[email protected]> * updating snapshots Signed-off-by: Sean Li <[email protected]> * adding i18n translation for no time filter option Signed-off-by: Sean Li <[email protected]> --------- Signed-off-by: Sean Li <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 3ae4cdc) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* adding UI changes * addressing comments * fixing more bugs, adding no time field prop for unsupported languages * addressing comments * addressing comments * Changeset file for PR #8166 created/updated * adressing comments, renaming label * addressing comments, adding tests * updating snapshots * adding i18n translation for no time filter option --------- (cherry picked from commit 3ae4cdc) Signed-off-by: Sean Li <[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> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration