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

feat: use Toolbar and ToolbarSidebar from analytics #2358

Merged
merged 27 commits into from
Aug 9, 2023

Conversation

HendrikThePendric
Copy link
Contributor

@HendrikThePendric HendrikThePendric commented May 30, 2023

Implements DHIS2-15167

Requires dhis2/analytics#1478


Key features

  1. Updated toolbar with hover menu menu

TODO

  • Update @dhis2/analytics once released.
  • Update tests for the new implementation

Screenshots

dv_demo

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Jun 20, 2023

@dhis2-bot dhis2-bot temporarily deployed to netlify June 20, 2023 13:27 Inactive
@HendrikThePendric HendrikThePendric marked this pull request as ready for review June 20, 2023 13:38
@dhis2-bot dhis2-bot temporarily deployed to netlify June 20, 2023 13:42 Inactive
@cypress
Copy link

cypress bot commented Jun 20, 2023

Passing run #2311 ↗︎

0 629 1 0 Flakiness 0

Details:

Merge 6913f7c into 20efd02...
Project: Data Visualizer App Commit: 379f44f614 ℹ️
Status: Passed Duration: 16:02 💡
Started: Aug 9, 2023 9:08 AM Ended: Aug 9, 2023 9:24 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 09:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 10:25 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 10:29 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 11:52 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 13:31 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 13:46 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 14:36 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 14:59 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 15:41 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 16:23 Inactive
package.json Outdated Show resolved Hide resolved
Comment on lines +6 to +8
.arrowIcon.listIsOpen {
transform: rotate(180deg);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm now rotating the arrow-icon when the list is open, as we do on select elements to give more visual feedback to the user and make the UI more consistent.

font-size: 14px;
padding-top: 1px;
Copy link
Contributor Author

@HendrikThePendric HendrikThePendric Jun 27, 2023

Choose a reason for hiding this comment

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

This padding is problematic. I'm not actually sure if we should keep this change. I LL I did a similar fix, which does make sense because there we always show the same icon. However, in DV each viz-type comes with its own icon. For some icons things now look better aligned but others actually look worse....

So in that case I would recommend to simply keep the text in the actual vertical center instead of pushing it 1px down.

@cooper-joe @janhenrikoverland @martinkrulltott

@dhis2-bot dhis2-bot temporarily deployed to netlify July 3, 2023 14:35 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 9, 2023 09:03 Inactive
@HendrikThePendric HendrikThePendric merged commit 99d5e5e into dev Aug 9, 2023
12 checks passed
@HendrikThePendric HendrikThePendric deleted the DHIS2-15167-DV-toolbar-update branch August 9, 2023 09:54
janhenrikoverland added a commit that referenced this pull request Aug 10, 2023
* feat: use Toolbar and ToolbarSidebar from analytics

* feat: use UpdateButton and HoverMenubar from analytics

* feat: update download menu to use hovermenu components from analytics

* feat: use hover menu components from analytics for options menu

* feat: use interpretations button from analytics

* chore: update pot file

* chore: upgrade @dhis2/analytics to latest

* chore: fix typo in component name

* fix: adjust e2e element slectors

* chore: fix missing and redundant imports

* chore: fix odd linter error which only fires on ci

* fix: adjust data test name

* chore: fix lines e2e test

* fix: adjust closeFileMenuWithClick command

* chore: fix failing legens e2e test

* chore: fix legend e2e test even better

* chore: fix scatter e2e

* chore: fix icon e2e

* chore: fix start e2e

* chore: clean up unused imports

* fix: remove divider from plain data source submenu

* chore: upgrade @dhis2/analytics to get toolbar UI improvements

* fix: tweak viz type selector styles to match toolbar

* chore: remove yarn start command which was only used for development

* chore: upgrade analytics to get decreased padding

* fix: ensure `MenuSectionHeader` is `dense` when in `HoverMenuBar`

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>
janhenrikoverland added a commit that referenced this pull request Aug 15, 2023
* feat: use Toolbar and ToolbarSidebar from analytics

* feat: use UpdateButton and HoverMenubar from analytics

* feat: update download menu to use hovermenu components from analytics

* feat: use hover menu components from analytics for options menu

* feat: use interpretations button from analytics

* chore: update pot file

* chore: upgrade @dhis2/analytics to latest

* chore: fix typo in component name

* fix: adjust e2e element slectors

* chore: fix missing and redundant imports

* chore: fix odd linter error which only fires on ci

* fix: adjust data test name

* chore: fix lines e2e test

* fix: adjust closeFileMenuWithClick command

* chore: fix failing legens e2e test

* chore: fix legend e2e test even better

* chore: fix scatter e2e

* chore: fix icon e2e

* chore: fix start e2e

* chore: clean up unused imports

* fix: remove divider from plain data source submenu

* chore: upgrade @dhis2/analytics to get toolbar UI improvements

* fix: tweak viz type selector styles to match toolbar

* chore: remove yarn start command which was only used for development

* chore: upgrade analytics to get decreased padding

* fix: ensure `MenuSectionHeader` is `dense` when in `HoverMenuBar`

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>
janhenrikoverland added a commit that referenced this pull request Aug 15, 2023
* feat: use Toolbar and ToolbarSidebar from analytics

* feat: use UpdateButton and HoverMenubar from analytics

* feat: update download menu to use hovermenu components from analytics

* feat: use hover menu components from analytics for options menu

* feat: use interpretations button from analytics

* chore: update pot file

* chore: upgrade @dhis2/analytics to latest

* chore: fix typo in component name

* fix: adjust e2e element slectors

* chore: fix missing and redundant imports

* chore: fix odd linter error which only fires on ci

* fix: adjust data test name

* chore: fix lines e2e test

* fix: adjust closeFileMenuWithClick command

* chore: fix failing legens e2e test

* chore: fix legend e2e test even better

* chore: fix scatter e2e

* chore: fix icon e2e

* chore: fix start e2e

* chore: clean up unused imports

* fix: remove divider from plain data source submenu

* chore: upgrade @dhis2/analytics to get toolbar UI improvements

* fix: tweak viz type selector styles to match toolbar

* chore: remove yarn start command which was only used for development

* chore: upgrade analytics to get decreased padding

* fix: ensure `MenuSectionHeader` is `dense` when in `HoverMenuBar`

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>
janhenrikoverland added a commit that referenced this pull request Aug 15, 2023
* chore: run workflow release job on tags as well (#2386)

Tag builds were not triggering creation of corresponding branch in d2-ci repo.
The core apps-to-bundle depends on these.

* test: add Cypress tests for SV icon (DHIS2-10496) (#2372)

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* test: more tests for custom calculations (DHIS2-13871) (#2287)

* test: rename AO-title to titlebar (DHIS2-15063) (#2435)

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* chore: run nightly at 6:20 instead of 2:20 to avoid concurrently running with instances reset (#2500)

* test: extend timeout after delete has been triggered (#2499)

* fix: inject style in props passed to VisualizationPlugin (DHIS2-15126) (#2322)

* fix: inject style in props passed to VisualizationPlugin

style is used to compute the correct width when toggling the legend
panel in dashboard.
style is not passed in props from dashboard because doing so can cause
re-rendering of the whole iframe tag which causes refetching of the
plugin and everything else (analytics included).

* refactor: move the size logic from the plugin wrapper

This is because eventually the PluginWrapper component will be replaced
by the generic one from app-platform.
If possible all custom logic should not be put in other components at
the app level.

* fix: observe size changes for legend positioning

* refactor: rename const for clarity

It's a callback ref, not a normal ref.

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>
Co-authored-by: Martin <[email protected]>

* chore: increase cypress default timeout for DOM activity (#2549)

* chore: manually bump deps (#2543)

* chore: advance the schedule for the nightly run (#2575)

* test: prevent test names from being dynamic (#2576)

* chore: disable the scheduled nightly test run (#2602)

The servers are currently slow and there will be very little frontend or backend activity during July 2023

* chore: upgrade cypress to v12 and adjust project to it

* chore: remove videos

* chore: gitignore cypress videos

* chore: switch test server to debug (test.e2e is broken/slow)

* chore: revert the test server changes and move to a separate PR

* test: comment out icon tests for currently unsupported types

* test: skip legend test while data element icons are unsupported

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* feat: use Toolbar and ToolbarSidebar from analytics (#2358)

* feat: use Toolbar and ToolbarSidebar from analytics

* feat: use UpdateButton and HoverMenubar from analytics

* feat: update download menu to use hovermenu components from analytics

* feat: use hover menu components from analytics for options menu

* feat: use interpretations button from analytics

* chore: update pot file

* chore: upgrade @dhis2/analytics to latest

* chore: fix typo in component name

* fix: adjust e2e element slectors

* chore: fix missing and redundant imports

* chore: fix odd linter error which only fires on ci

* fix: adjust data test name

* chore: fix lines e2e test

* fix: adjust closeFileMenuWithClick command

* chore: fix failing legens e2e test

* chore: fix legend e2e test even better

* chore: fix scatter e2e

* chore: fix icon e2e

* chore: fix start e2e

* chore: clean up unused imports

* fix: remove divider from plain data source submenu

* chore: upgrade @dhis2/analytics to get toolbar UI improvements

* fix: tweak viz type selector styles to match toolbar

* chore: remove yarn start command which was only used for development

* chore: upgrade analytics to get decreased padding

* fix: ensure `MenuSectionHeader` is `dense` when in `HoverMenuBar`

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>

* Merge pull request #2613 from dhis2/chore/upgrade-cypress-to-v12

chore: upgrade cypress to v12

* chore: run nightly at 6:20 to avoid concurrently running with instances reset (#2500)

* test: extend timeout after delete has been triggered (#2499)

* fix: inject style in props passed to VisualizationPlugin (DHIS2-15126) (#2322)

* fix: inject style in props passed to VisualizationPlugin

style is used to compute the correct width when toggling the legend
panel in dashboard.
style is not passed in props from dashboard because doing so can cause
re-rendering of the whole iframe tag which causes refetching of the
plugin and everything else (analytics included).

* refactor: move the size logic from the plugin wrapper

This is because eventually the PluginWrapper component will be replaced
by the generic one from app-platform.
If possible all custom logic should not be put in other components at
the app level.

* fix: observe size changes for legend positioning

* refactor: rename const for clarity

It's a callback ref, not a normal ref.

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>
Co-authored-by: Martin <[email protected]>

* chore: increase cypress default timeout for DOM activity (#2549)

* chore: manually bump deps (#2543)

* chore: advance the schedule for the nightly run (#2575)

* test: prevent test names from being dynamic (#2576)

* chore: disable the scheduled nightly test run (#2602)

Servers are currently slow. Will be little activity during July 2023.

* chore: upgrade cypress to v12 and adjust project to it

* chore: remove videos

* chore: gitignore cypress videos

* chore: switch test server to debug (test.e2e is broken/slow)

* chore: revert the test server changes and move to a separate PR

* test: comment out icon tests for currently unsupported types

* test: skip legend test while data element icons are unsupported

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* feat: use Toolbar and ToolbarSidebar from analytics (#2358)

* feat: use Toolbar and ToolbarSidebar from analytics

* feat: use UpdateButton and HoverMenubar from analytics

* feat: update download menu to use hovermenu components from analytics

* feat: use hover menu components from analytics for options menu

* feat: use interpretations button from analytics

* chore: update pot file

* chore: upgrade @dhis2/analytics to latest

* chore: fix typo in component name

* fix: adjust e2e element slectors

* chore: fix missing and redundant imports

* chore: fix odd linter error which only fires on ci

* fix: adjust data test name

* chore: fix lines e2e test

* fix: adjust closeFileMenuWithClick command

* chore: fix failing legens e2e test

* chore: fix legend e2e test even better

* chore: fix scatter e2e

* chore: fix icon e2e

* chore: fix start e2e

* chore: clean up unused imports

* fix: remove divider from plain data source submenu

* chore: upgrade @dhis2/analytics to get toolbar UI improvements

* fix: tweak viz type selector styles to match toolbar

* chore: remove yarn start command which was only used for development

* chore: upgrade analytics to get decreased padding

* fix: ensure `MenuSectionHeader` is `dense` when in `HoverMenuBar`

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>

* Merge pull request #2613 from dhis2/chore/upgrade-cypress-to-v12

chore: upgrade cypress to v12

---------

Co-authored-by: Jen Jones Arnesen <[email protected]>
Co-authored-by: Martin <[email protected]>
Co-authored-by: @dhis2-bot <[email protected]>
Co-authored-by: Edoardo Sabadelli <[email protected]>
Co-authored-by: HendrikThePendric <[email protected]>
Co-authored-by: Hendrik de Graaf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants