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

Enhancement/4211 improve visualizations text size #4254

Merged
merged 13 commits into from Jun 17, 2022

Conversation

chantal-kelm
Copy link
Member

@chantal-kelm chantal-kelm commented Jun 13, 2022

The two graphs, the lists and the select were centered.
The font size was also corrected to the same used in the table.
To test go to:
Modules/Vulnerabilities.
or Agents/Select an agent/Click on the more button/Click on Vulnerabilities.

Screenshot from 2022-06-13 13-47-33
Screenshot from 2022-06-13 13-47-54

@chantal-kelm chantal-kelm added type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side backport 4.3-7.16 labels Jun 13, 2022
@chantal-kelm chantal-kelm linked an issue Jun 13, 2022 that may be closed by this pull request
@Desvelao
Copy link
Member

thoughts:

The visualizations generated with the visualization plugin of the platform have the legend aligned to the top. For consistency, I would not change this alignment. Do we want the modified aligment?
image

In my opinion, the select is not part of the visualization, so I would not include this element to be aligned with the legend.

@@ -34,51 +36,55 @@ export const VisualizationBasic = ({
noDataMessage,
errorTitle = 'Error',
errorMessage,
error
error,
select
Copy link
Member

Choose a reason for hiding this comment

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

nitpick If we want to include some element before the legend, we should not call it select and I would suggest a more generic name.

CHANGELOG.md Outdated Show resolved Hide resolved
@chantal-kelm
Copy link
Member Author

chantal-kelm commented Jun 15, 2022

It was concluded that it was better not to implement some changes in the styles, in order to maintain some consistency in the visual.
This is how it currently looks with the latest changes.
The font size has been changed so that it is uniform throughout the view, including the font size of the select.

Modules/Vulnerabilities
Screenshot from 2022-06-16 13-03-15

The other view where font size also impacts is Agents which looks like this:
Screenshot from 2022-06-16 13-03-53

@@ -17,7 +17,7 @@ type ChartLegendProps = {
*/
export function ChartLegend({ data }: ChartLegendProps) {
const list = data.map(({label, labelColor, value, ...rest}, idx) => ({
label: `${label} (${value})`,
label: <div style={{fontSize: '0.793rem'}}>{`${label} (${value})`}</div>,
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: The EuiListGroup component has a property to modify the size of all EuiListItem. You could use the property instead of the proposed solution.

Example:

return (
  <EuiListGroup
    className="chart-legend"
    listItems={list}
    color='text'
    size='xs'
    flush />
)

@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 4.09% ( 1489 / 36387 )
Branches 1.67% ( 473 / 28242 )
Functions 3.06% ( 272 / 8898 )
Lines 4.14% ( 1440 / 34804 )

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

review
code ✔️
test ✔️

Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

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

LGTM!

@AlexRuiz7 AlexRuiz7 merged commit ad37304 into 4.3-7.10 Jun 17, 2022
@AlexRuiz7 AlexRuiz7 deleted the enhancement/4211-improve-visualizations-text-size branch June 17, 2022 11:42
github-actions bot pushed a commit that referenced this pull request Jun 17, 2022
* Unused imports

* Centered gravity graphic and list

* font size texts first graph

* CHANGELOG

* Removing centered, and putting the same font size to the select

(cherry picked from commit ad37304)
github-actions bot pushed a commit that referenced this pull request Jun 17, 2022
* Unused imports

* Centered gravity graphic and list

* font size texts first graph

* CHANGELOG

* Removing centered, and putting the same font size to the select

(cherry picked from commit ad37304)
AlexRuiz7 pushed a commit that referenced this pull request Jun 17, 2022
…#4275)

Enhancement/4211 improve visualizations text size (#4254)

* Unused imports

* Centered gravity graphic and list

* font size texts first graph

* CHANGELOG

* Removing centered, and putting the same font size to the select

(cherry picked from commit ad37304)

Co-authored-by: Chantal Belén kelm <99441266+chantal-kelm@users.noreply.github.com>
AlexRuiz7 pushed a commit that referenced this pull request Jun 17, 2022
…ize (#4276)

Enhancement/4211 improve visualizations text size (#4254)

* Unused imports

* Centered gravity graphic and list

* font size texts first graph

* CHANGELOG

* Removing centered, and putting the same font size to the select

(cherry picked from commit ad37304)

Co-authored-by: Chantal Belén kelm <99441266+chantal-kelm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue UI/UX Generic label for things related to the font-end side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve visualizations text size
3 participants