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

Feature: Draggable window improvements #96

Merged

Conversation

ATMarcks
Copy link
Contributor

  • Modularized the draggable windows
    • Created a DraggableWindow window component, removing reuse of the window background/x button/drag handle styling code in the TexturePicker and the Explainer
    • Stylized draggable windows can now be simply created like the following:
      <DraggableWindow hidden={hidden} setHidden={setHidden}>
        <div>I can be dragged around</div>
      </DraggableWindow>```
      
  • Added a WindowManagementProvider which tracks the state of the most recently clicked/opened window and ensures it is on top of the other windows (has a higher z-index)
    • The draggables now act more like Windows or MacOS; if you have both the explainer and the texture picker open, and they are overlapping, clicking on the window that is behind the other one brings it to the front
  • Fixed issue with title bar rendering
    • The pattern no longer clips behind the "X" button
    • image
    • I think this was the original intention given the flexbox styling on the parent

Let me know if this is too much for one PR, I can cherry pick the commits out into two or three branches

@ATMarcks ATMarcks marked this pull request as ready for review August 23, 2024 10:26
@davidar
Copy link
Contributor

davidar commented Aug 24, 2024

Nice, thanks for cleaning this up

@davidar davidar merged commit 9412fb3 into compute-toys:master Aug 24, 2024
1 check passed
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.

2 participants