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: added a splashscreen lab #2106

Open
wants to merge 6 commits into
base: v2
Choose a base branch
from

Conversation

simonhyll
Copy link
Sponsor Contributor

@simonhyll simonhyll commented May 1, 2024

What kind of changes does this PR include?

  • New or updated content

Description

Adds a new splashscreen lab.

Copy link

netlify bot commented May 1, 2024

Deploy Preview for tauri-v2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e4214c9
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v2/deploys/6652542adab63e0008dcb2ae
😎 Deploy Preview https://deploy-preview-2106--tauri-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

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

@simonhyll simonhyll marked this pull request as ready for review May 21, 2024 16:30
@simonhyll simonhyll requested a review from a team as a code owner May 21, 2024 16:30
@simonhyll
Copy link
Sponsor Contributor Author

It's not perfect yet but it's close enough now where I'd like some input on it. 😄

@simonhyll simonhyll added this to the Version 2.0 milestone May 21, 2024
@simonhyll simonhyll added enhancement Does it add or improve content? tauri 2.0 docs and removed tauri 2.0 docs labels May 21, 2024
@simonhyll simonhyll requested a review from vasfvitor May 23, 2024 17:44
@vasfvitor
Copy link
Contributor

I'm just looking at it right now lol, good timing

@vasfvitor
Copy link
Contributor

what do you think of adding the full CLI as a way to quick start?
I guess it should be

pnpm create tauri-app --beta --template vanilla --manager pnpm --mobile yes splashscreen-lab

@vasfvitor
Copy link
Contributor

I'm gonna follow the lab and give my feedback based on it

@simonhyll simonhyll self-assigned this May 23, 2024
Copy link
Contributor

@vasfvitor vasfvitor left a comment

Choose a reason for hiding this comment

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

well, even after the requested changed it doesn't work. Tried to fix it, broke even more. I could give another shot, or do you want to do it yourself?

Is the goal to teach about state? Because if not, I think, if possible, it should be done without it. Or else, add a requirement lab that teaches about managing state. Speaking of which, I've read many times your webpage about state and it helped me A LOT when I needed it , really!

```rust
// /src-tauri/src/lib.rs
// Import functionalities we'll be using
use tauri::async_runtime::spawn;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
use tauri::async_runtime::spawn;
use tauri::{async_runtime::spawn, State, AppHandle};

// Fake performing some heavy action for 3 seconds
println!("Performing really heavy backend setup task...");
sleep(Duration::from_secs(3)).await;
println!("Backend setup task completed!")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
println!("Backend setup task completed!")
println!("Backend setup task completed!");

backend_task: false
}))
// Add a command we can use to check
.invoke_handler(tauri::generate_handler!([check_completion]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.invoke_handler(tauri::generate_handler!([check_completion]))
.invoke_handler(tauri::generate_handler![set_complete])

Copy link
Contributor

Choose a reason for hiding this comment

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

or the function could be renamted to check_completion

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Awesome job @simonhyll, I left just a tiny suggestion 🫡

Comment on lines +103 to +104
</div>
</body>
Copy link
Member

Choose a reason for hiding this comment

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

I think that you missed adding a closing tag for the parent div here.

Suggested change
</div>
</body>
</div>
</div>
</body>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Does it add or improve content?
Projects
Status: 📋 In review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants