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

Add fullscreen directive #85

Open
fvoska opened this issue Feb 8, 2023 · 0 comments · May be fixed by #86
Open

Add fullscreen directive #85

fvoska opened this issue Feb 8, 2023 · 0 comments · May be fixed by #86
Assignees

Comments

@fvoska
Copy link
Contributor

fvoska commented Feb 8, 2023

Description

Utilize Element Fullscreen API so that we can make any element enter full-screen mode. This will be useful for dashboard-like pages where certain sections/cards/charts should be maximised.

API proposal

A standalone directive that can be attached to a trigger element and set the target element that should enter full-screen, similar to how mat-menu is used.

Directive would attach a click handler to the host element that will toggle between fullscreen and non-fullscreen.

Directive selector should have a matching @Input('infFullscreenTriggerFor') that will be used for passing the target element.

Directive should also include exportAs: "infFullscreen" that can be used for reading the current fullscreen state.

<button [infFullscreenTriggerFor]="targetElement" #fullscreenState="infFullscreen">
  {{  fullscreenState.isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen' }}
</button>

<section #targetElement>
  ...
</section>

a11y

Exiting the fullscreen should be possible via keyboard (Esc)

@ivan-mitric ivan-mitric linked a pull request Feb 13, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants