Skip to content

Commit

Permalink
Merge pull request #2641 from swaterkamp/helpClickArea
Browse files Browse the repository at this point in the history
Stop toolbars from growing if they have only the help icon
  • Loading branch information
bjoernricks committed Dec 22, 2020
2 parents c5f01c5 + f44223c commit fdd5170
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Use <predefined> to disable feed object editing and filter creation on feed status page [#2398](https://github.com/greenbone/gsa/pull/2398)

### Fixed
- Stop growing of toolbars which only have the help icon [#2641](https://github.com/greenbone/gsa/pull/2641)
- Fixed initial value of dropdown for including related resources for permissions [#2632](https://github.com/greenbone/gsa/pull/2632)
- Fixed compiling gsad with libmicrohttp 0.9.71 and later [#2625](https://github.com/greenbone/gsa/pull/2625)
- Fixed display of alert condition "Severity changed" [#2623](https://github.com/greenbone/gsa/pull/2623)
Expand Down
11 changes: 6 additions & 5 deletions gsa/src/web/pages/extras/cvsscalculatorpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ const CvssCalculator = ({gmp, onInteraction, ...props}) => {

return (
<Layout flex="column">
<ToolBarIcons />
<span>
{' '}
{/* span prevents Toolbar from growing */}
<ToolBarIcons />
</span>
<Section
img={<CvssIcon size="large" />}
title={_('CVSSv2 Base Score Calculator')}
Expand Down Expand Up @@ -370,10 +374,7 @@ const mapDispatchToProps = (dispatch, {gmp}) => ({

export default compose(
withGmp,
connect(
undefined,
mapDispatchToProps,
),
connect(undefined, mapDispatchToProps),
)(CvssCalculator);

// vim: set ts=2 sw=2 tw=80:
6 changes: 5 additions & 1 deletion gsa/src/web/pages/extras/feedstatuspage.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ const FeedStatus = ({feeds}) => {
<React.Fragment>
<PageTitle title={_('Feed Status')} />
<Layout flex="column">
<ToolBarIcons />
<span>
{' '}
{/* span prevents Toolbar from growing */}
<ToolBarIcons />
</span>
<Section img={<FeedIcon size="large" />} title={_('Feed Status')} />
<Table>
<TableBody>
Expand Down
11 changes: 6 additions & 5 deletions gsa/src/web/pages/extras/trashcanpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,11 @@ class Trashcan extends React.Component {
<React.Fragment>
<PageTitle title={_('Trashcan')} />
<Layout flex="column">
<ToolBarIcons />
<span>
{' '}
{/* span prevents Toolbar from growing */}
<ToolBarIcons />
</span>
{error && (
<ErrorDialog
text={error.message}
Expand Down Expand Up @@ -560,10 +564,7 @@ const mapDispatchToProps = (dispatch, {gmp}) => ({

export default compose(
withGmp,
connect(
undefined,
mapDispatchToProps,
),
connect(undefined, mapDispatchToProps),
)(Trashcan);

// vim: set ts=2 sw=2 tw=80:
2 changes: 1 addition & 1 deletion gsa/src/web/pages/start/__tests__/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('StartPage tests', () => {
expect(icons[0]).toHaveAttribute('title', 'Help: Dashboards');

// Tabs
expect(spans[2]).toHaveTextContent('Overview');
expect(spans[3]).toHaveTextContent('Overview');
expect(icons[2]).toHaveAttribute('title', 'Add new Dashboard');

// Dashboard Controls
Expand Down
11 changes: 6 additions & 5 deletions gsa/src/web/pages/start/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ class StartPage extends React.Component {
return (
<React.Fragment>
<PageTitle title={_('Dashboards')} />
<ToolBarIcons />
<span>
{' '}
{/* span prevents Toolbar from growing */}
<ToolBarIcons />
</span>
<Section title={_('Dashboards')} img={<DashboardIcon size="large" />}>
{isLoading ? (
<Loading />
Expand Down Expand Up @@ -557,10 +561,7 @@ const mapDispatchToProps = (dispatch, {gmp}) => ({

export default compose(
withGmp,
connect(
mapStateToProps,
mapDispatchToProps,
),
connect(mapStateToProps, mapDispatchToProps),
)(StartPage);

// vim: set ts=2 sw=2 tw=80:

0 comments on commit fdd5170

Please sign in to comment.