-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Dashboard][Papercut] Customize overflow text for Links Panel #199844
Changes from 15 commits
b4ae7e0
b676aff
8277b06
b6e11f2
68dfef4
0188e9f
b4d644e
46db6b8
9aa8e82
775c949
765ba9f
13ae8b5
617eb54
461a43a
a183945
1ac9d8d
8218344
f93d22a
cdad488
be4c8c1
00c7384
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -52,6 +52,34 @@ export const DashboardDrilldownOptionsComponent = ({ | |||||
onChange={() => onOptionChange({ openInNewTab: !options.openInNewTab })} | ||||||
data-test-subj="dashboardDrillDownOptions--openInNewTab--checkbox" | ||||||
/> | ||||||
<EuiSpacer size="s" /> | ||||||
<EuiSwitch | ||||||
compressed | ||||||
name="overflowEllipsis" | ||||||
label={dashboardDrilldownConfigStrings.component.getOverflowEllipsis()} | ||||||
checked={options.overflowEllipsis} | ||||||
onChange={() => | ||||||
onOptionChange({ | ||||||
overflowEllipsis: !options.overflowEllipsis, | ||||||
overflowTextWrap: !options.overflowTextWrap, | ||||||
}) | ||||||
} | ||||||
data-test-subj="dashboardDrillDownOptions--overflowEllipsis--checkbox" | ||||||
/> | ||||||
<EuiSpacer size="s" /> | ||||||
<EuiSwitch | ||||||
compressed | ||||||
name="overflowTextWrap" | ||||||
label={dashboardDrilldownConfigStrings.component.getOverflowTextWrap()} | ||||||
checked={options.overflowTextWrap} | ||||||
onChange={() => | ||||||
onOptionChange({ | ||||||
overflowTextWrap: !options.overflowTextWrap, | ||||||
overflowEllipsis: !options.overflowEllipsis, | ||||||
}) | ||||||
} | ||||||
data-test-subj="dashboardDrillDownOptions--overflowTextWrap--checkbox" | ||||||
/> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rshen91 I think it is confusing to have seperate "Wrap text" and "Ellipses" toggles - these components should be used for entirely distinct settings, and they shouldn't be "linked" (pun intended 😛) together like this: I think a button group, where only a single option is allowed, might be a better option here. Pinging @andreadelrio here to see if she has a better suggestion, though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call! I updated the UI in 1ac9d8d. I'm open to suggestions with any labels and naming thanks!!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we keep the setting per-link, I think the "Overflow" setting should come first:
I also wonder if we could do something with an icon instead? This is just an idea, though - would definitely need @andreadelrio's opinion here 😆 This ties in to #199844 (comment), since we shouldn't be putting this setting in the shared component - it should be just for links. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to using a button group. |
||||||
</div> | ||||||
</EuiFormRow> | ||||||
</> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,14 @@ export type DashboardDrilldownOptions = { | |
useCurrentFilters: boolean; | ||
useCurrentDateRange: boolean; | ||
openInNewTab: boolean; | ||
overflowTextWrap: boolean; | ||
overflowEllipsis: boolean; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be a setting for the entire links panel, not per-link. What do you think @rshen91? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @andreadelrio here, too 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I personally like having this per link, for greater user flexibility, but will default to what you both think if you both like it for the entire links panel. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andreadelrio can be our tie breaker, hahaha :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be a setting for the entire links panel. |
||
}; | ||
|
||
export const DEFAULT_DASHBOARD_DRILLDOWN_OPTIONS: DashboardDrilldownOptions = { | ||
openInNewTab: false, | ||
useCurrentDateRange: true, | ||
useCurrentFilters: true, | ||
overflowEllipsis: true, | ||
overflowTextWrap: false, | ||
}; |
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.
So the problem with making changes to this file is that this component is used for both drilldowns and links. You can see here that we now have an "Overflow" setting for dashboard drilldowns which.... doesn't really make sense :P
This setting is only relevant to links panels IMO.