Skip to content

Welcome screen #702

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

Merged
merged 24 commits into from
Jul 22, 2022
Merged

Welcome screen #702

merged 24 commits into from
Jul 22, 2022

Conversation

mfish33
Copy link
Contributor

@mfish33 mfish33 commented Jun 30, 2022

Closes #405

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 30, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: cf3dae6
Status: ✅  Deploy successful!
Preview URL: https://dc5adde4.graphite-master.pages.dev
Branch Preview URL: https://welcome-screen.graphite-master.pages.dev

View logs

@Keavon Keavon marked this pull request as ready for review July 21, 2022 09:20
@Keavon Keavon requested a review from 0HyperCube July 21, 2022 09:20
@Keavon
Copy link
Member

Keavon commented Jul 21, 2022

Bug I just found:

  1. Refresh the page to the welcome screen (no existing documents)
  2. Open the New Document dialog
  3. Uncheck Infinite Canvas and click OK to make the new document

The white rectangle for the canvas is stuck in the top left corner (if the default 1920x1080 would already fill the viewport at 100% scale at your monitor resolution and window size, refresh the page and this time set the document dimensions to something smaller).

The JS console displays this:
image

The canvas can't be panned when it is frozen. Also, the displayed scale 0%, although entering a new value is possible and doing so unfreezes panning.

This doesn't happen for infinite canvas. It doesn't happen for any documents created after the first document is created upon loading the app (even if the first document is infinite canvas, even if the first document is closed to show the welcome screen again).

I don't have time to debug this today, but I wonder if you have any ideas @0HyperCube?

@0HyperCube
Copy link
Member

@Keavon This is due to the zoom document to fit having the viewport bounds as (0,0) and so doing a division by 0. The viewport bounds are requested to be updated but the dispatcher keeps the frontend message in a queue and handles the whole backend stack first. I added an exception in this case, so we immediately deal with the frontend message. I also simplified the new document dialog code to remove unnecessary messages (which were previously needed due to the message ordering).

@Keavon
Copy link
Member

Keavon commented Jul 22, 2022

@Keavon This is due to the zoom document to fit having the viewport bounds as (0,0) and so doing a division by 0. The viewport bounds are requested to be updated but the dispatcher keeps the frontend message in a queue and handles the whole backend stack first. I added an exception in this case, so we immediately deal with the frontend message. I also simplified the new document dialog code to remove unnecessary messages (which were previously needed due to the message ordering).

Excellent sleuthing, quite an interesting reminder about the challenges we'll continue to face with message ordering where vigilance and testing will be required. I'm glad you also noticed that you could clean up the code now so that didn't become an unneeded relic, thank you for keeping the code lean and clean!

@Keavon Keavon merged commit 010ba5a into master Jul 22, 2022
@Keavon Keavon deleted the welcome-screen branch July 22, 2022 22:09
Keavon added a commit that referenced this pull request Jul 30, 2023
…o widgets (#702)

* unfinished implementation

* Add frontend for the empty panel screen

* Add an icon for Folder based on NodeFolder

* fixed messages causing peicees of ui not to render on new document

* Standardize nextTick syntax

* WIP generisization of component subscriptions (not compiling yet)

* Fix crash when loading font and there is no active document

* Only advertise tool actions with a document

* Fix failure to create new document

* Initalise the properties panel

* Fix highlight tab, canvas jump, warns and layer tree

* Fix tests

* Possibly fix some things?

* Move WorkingColors layout definition to backend

* Standardize action macro formatting

* Provide typing for widgets in TS/Vue and associated cleanup

* Fix viewport positioning initialization

* Fix menu bar init at startup not document creation

* Fix no viewport bounds bug

* Change !=0 to >0

* Simplify the init system

Closes #656

Co-authored-by: Keavon Chambers <[email protected]>
Co-authored-by: 0hypercube <[email protected]>
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.

Welcome screen for empty tabs
3 participants