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: implement fullscreen context + component #237

Merged
merged 11 commits into from Oct 13, 2022

Conversation

wadjih-bencheikh18
Copy link
Member

closes #217

@netlify
Copy link

netlify bot commented Oct 2, 2022

Deploy Preview for analysis-ui-components ready!

Name Link
🔨 Latest commit 66631dc
🔍 Latest deploy log https://app.netlify.com/sites/analysis-ui-components/deploys/63473f4a191fbf000851a5ac
😎 Deploy Preview https://deploy-preview-237--analysis-ui-components.netlify.app/stories
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2022

Codecov Report

Base: 91.85% // Head: 91.85% // No change to project coverage 👍

Coverage data is based on head (66631dc) compared to base (a3308fb).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #237   +/-   ##
=======================================
  Coverage   91.85%   91.85%           
=======================================
  Files           8        8           
  Lines         491      491           
  Branches       80       80           
=======================================
  Hits          451      451           
  Misses         40       40           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lpatiny
Copy link
Contributor

lpatiny commented Oct 8, 2022

In full screen I switch surprisingly to dark mode.

image

Also in the application the 'open stories' link should not be present because the full screen mode should be targeted to the following part:

image

@wadjih-bencheikh18
Copy link
Member Author

In full screen I switch surprisingly to dark mode.

I will try to find out whats the problem
Because i tried the functionality on other pages and it works perfectly

@wadjih-bencheikh18
Copy link
Member Author

@lpatiny fullscreen bug fixed

src/app/App.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@stropitek stropitek left a comment

Choose a reason for hiding this comment

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

Please create an example with 2 nested parts of the UI which can be toggled to fullscreen.

@stropitek
Copy link
Contributor

Please create an example with 2 nested parts of the UI which can be toggled to fullscreen.

I meant 1 example which nests 2 fullscreen elements, not 2 examples which each have one fullscreen element.

@wadjih-bencheikh18
Copy link
Member Author

I meant 1 example which nests 2 fullscreen elements, not 2 examples which each have one fullscreen element.

done, sorry for the misunderstanding

@stropitek
Copy link
Contributor

"Nest" means 1 contains the other 😅

<FullScreenProvider>
  <Content i="1" />
  <FullScreenProvider>  
    <Content i="2" />
  </FullScreenProvider>
</FullScreenProvider>

@targos
Copy link
Member

targos commented Oct 11, 2022

^ @stropitek do you expect to be able to nest the fullscreen action? Meaning if you put the parent in full screen, you can then put the child too, ending up with two elements in full screen.

@wadjih-bencheikh18
Copy link
Member Author

"Nest" means 1 contains the other

Implemented.

@stropitek
Copy link
Contributor

do you expect to be able to nest the fullscreen action? Meaning if you put the parent in full screen, you can then put the child too, ending up with two elements in full screen.

I see nesting as a potentially valid use case (for example full app + spectra area) and I wanted to see how it behaves with the current implementation. Apparently it does not behave correctly, but I'm not expecting that it works in this PR.

I guess we need to validate that nesting / stacking is a valid use case. @lpatiny any thoughts?

@lpatiny
Copy link
Contributor

lpatiny commented Oct 11, 2022

I think it make sense that many parts of the same application can go full screen and they could be nested but I think if we are in full screen we should not be able to put in full screen a part of it. This means that all the 'full screen' button should disappear once we are in full screen.

I'm not aware of any application in which we can have a stack of full screen and this could be quite confusing for the end user.

@targos
Copy link
Member

targos commented Oct 12, 2022

This behavior is weird if you "Toggle fullscreen 1" and the try to "Toggle fullscreen 2".

I think if we are in full screen we should not be able to put in full screen a part of it.

Why not? I think it should either replace the existing full screen element or create a stack, but not remove buttons (that would be difficult to implement)

@wadjih-bencheikh18
Copy link
Member Author

This behavior is weird if you "Toggle fullscreen 1" and the try to "Toggle fullscreen 2".

I fixed the behavior and it works perfectly now

@targos
Copy link
Member

targos commented Oct 13, 2022

I think there's still an issue when the user exits fullscreen using the Escape key. In that case, you need to click twice on the button to enter fullscreen again.

@stropitek stropitek merged commit 37d42df into zakodium-oss:main Oct 13, 2022
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 this pull request may close these issues.

Create full screen context
5 participants