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: add fullscreen option to visualization items [DHIS2-9879] #1358

Merged
merged 31 commits into from
Jan 5, 2021

Conversation

jenniferarnesen
Copy link
Collaborator

@jenniferarnesen jenniferarnesen commented Dec 7, 2020

image

image

Todo:

  • Remove fullscreen icon from map (separate implementation)
  • Get fullscreen icon from ui-icons instead of having the svg code in the app

Upcoming refactor:

  • the current solution relies on non-react use of document.querySelector. For best practice, this should instead be done with refs, but using refs would have required a somewhat big refactor. I would prefer to do this refactor separately since the testing scope is larger.

Other:

  • No cypress tests added since it isn't currently possible to test the fullscreen api in cypress. I'll be keeping an eye on if/when this gets implemented in cypress (Cypress should allow fullscreen for AUT cypress-io/cypress#7776)
  • Minor refactor: move check for whether to show ItemHeaderButtons (pluginIsAvailable) out of ItemHeaderButtons and to Item, so that the logic doesn't get too complex in ItemHeaderButtons (would have been first checking pluginIsAvailable, then checking the fullsreen prop)

Base automatically changed from chore/refactor-vis-item-squashed to master December 10, 2020 10:09
const el = document.querySelector(this.itemDomElSelector)
if (el?.requestFullscreen) {
el.onfullscreenchange = this.handleFullscreenChange
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we should handle the error case with onfullscreenerror

@jenniferarnesen jenniferarnesen merged commit 746d7b0 into master Jan 5, 2021
@jenniferarnesen jenniferarnesen deleted the feat/fullscreen-latest branch January 5, 2021 14:39
dhis2-bot added a commit that referenced this pull request Jan 5, 2021
# [31.4.0](v31.3.1...v31.4.0) (2021-01-05)

### Features

* add fullscreen option to visualization items [DHIS2-9879] ([#1358](#1358)) ([746d7b0](746d7b0)), closes [cypress-io/cypress#7776](cypress-io/cypress#7776)
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 31.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants