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 Splash screen to Drifty GUI #400

Merged
merged 23 commits into from
Dec 30, 2023

Conversation

SaptarshiSarkar12
Copy link
Owner

@SaptarshiSarkar12 SaptarshiSarkar12 commented Dec 27, 2023

Fixes issue

Fixes #280

Changes proposed

  • Added Splash screen to Drifty GUI
  • A JavaFX Preloader which corresponds to the case of Splash screen has been added

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screen Recordings

When Drifty GUI is run for the very first time 👇

Screencast.from.2023-12-27.20-43-25.webm

When Drifty GUI is run the second time 👇

Screencast.from.2023-12-27.20-47-04.webm

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Implemented a splash screen for improved user experience during application startup.
    • Updated Docker build instructions for macOS.

@SaptarshiSarkar12 SaptarshiSarkar12 linked an issue Dec 27, 2023 that may be closed by this pull request
Copy link

vercel bot commented Dec 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drifty ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2023 0:35am

Copy link
Contributor

coderabbitai bot commented Dec 27, 2023

Walkthrough

The changes involve refining the Drifty GUI application's Docker setup to enable the GUI to access the X11 socket for display and removing unnecessary elements from the build instructions.

Changes

File Path Change Summary
Docker/macOS Docker Build Instructions.md Removed a reminder comment and a newline.
README.md Added a volume mount option to enable GUI access to the X11 socket.

Assessment against linked issues

Objective Addressed Explanation
#280: Add Splash screen for Drifty GUI The changes in the Docker setup are not directly related to the implementation of the splash screen feature.

Poem

Amidst the code's dance, a Docker tale unfurls,
No splash in sight, yet the setup whirls.
Drifty dreams of a transparent screen,
But in Docker's embrace, it's yet unseen. 🐰🌟

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid.
    • @coderabbitai read the files in the src/scheduler package and generate README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added CI/CD 🔁 Pull Requests which update GitHub Actions code App 💻 Issues/Pull Requests which update Drifty Application Code dependencies 📦️ Pull Requests that update dependencies maven 📦️ Pull Requests that update Maven dependencies labels Dec 27, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Yeah! You did it 🎉 Now, Relax 😉, Grab a drink ☕, and wait for the maintainers to check your contributions. Meanwhile, you can discuss on other issues and solve them 😀. Thank You 😃!

Meanwhile you can also discuss about the project in our Discord Server 😀

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 425481c and ca9c003.
Files ignored due to filter (2)
  • GUI/pom.xml
  • GUI/src/main/resources/META-INF/native-image/reflect-config.json
Files selected for processing (10)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/docker-publish.yml (1 hunks)
  • CLI/src/main/java/module-info.java (1 hunks)
  • Core/src/main/java/init/Environment.java (2 hunks)
  • Core/src/main/java/preferences/Clear.java (1 hunks)
  • Core/src/main/java/preferences/Get.java (1 hunks)
  • Core/src/main/java/preferences/Labels.java (1 hunks)
  • Core/src/main/java/preferences/Set.java (1 hunks)
  • GUI/src/main/java/main/Drifty_GUI.java (4 hunks)
  • GUI/src/main/java/ui/Splash.java (1 hunks)
Additional comments: 11
CLI/src/main/java/module-info.java (1)
  • 4-4: Please ensure that the org.apache.commons.io module is utilized within the project, as unused module requirements can lead to unnecessary bloat.
Core/src/main/java/preferences/Labels.java (1)
  • 11-11: The addition of the YT_DLP_UPDATING constant is noted and appears to be part of the new feature implementation.
Core/src/main/java/preferences/Clear.java (1)
  • 30-32: The new ytDlpUpdating method correctly implements the removal of the YT_DLP_UPDATING preference.
Core/src/main/java/preferences/Set.java (1)
  • 62-65: The new ytDlpUpdating method in the Set class is correctly implemented to update the YT_DLP_UPDATING preference.
Core/src/main/java/preferences/Get.java (1)
  • 65-67: The new ytDlpUpdating method in the Get class is correctly implemented to retrieve the YT_DLP_UPDATING preference.
GUI/src/main/java/ui/Splash.java (1)
  • 20-74: The implementation of the Splash class appears to be well-structured and aligns with the objective of displaying a splash screen during application startup.
Core/src/main/java/init/Environment.java (1)
  • 63-69: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [65-80]

The modifications to the checkAndUpdateYtDlp method correctly set the YT_DLP_UPDATING preference to indicate the update status of ytDlp.

.github/workflows/docker-publish.yml (1)
  • 80-98: The workflow has been updated to include steps for installing ffmpeg based on the operating system and to modify the Maven command to skip tests. Please ensure that skipping tests does not overlook any potential issues that could be caught by running them.
GUI/src/main/java/main/Drifty_GUI.java (3)
  • 37-38: Setting the javafx.preloader property to use the Splash class is correct for integrating the splash screen. Ensure that the Splash class is properly implemented and that it extends javafx.application.Preloader.

  • 52-59: The start method has been updated to initialize the environment, set stage properties, and notify the preloader before showing the stage. This is a critical part of integrating the splash screen. Ensure that the Environment.initializeEnvironment() method is correctly implemented and that it does not cause any delays or exceptions that could affect the display of the splash screen.

  • 73-73: The call to UIController.initLogic(gridPane) within the createScene method suggests that UI initialization logic is being handled here. Verify that this method is correctly setting up the UI components and that it does not interfere with the splash screen's display.

Verification successful



The initLogic method exists in the UIController class and is defined as public static void initLogic(MainGridPane pane). This confirms the method's presence and signature, which is responsible for initializing the UI logic.

Given this information, the method UIController.initLogic(gridPane) within the createScene method is correctly placed for UI initialization. There is no evidence from the scripts run to suggest that it interferes with the splash screen's display.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the implementation of UIController.initLogic method.
ast-grep --lang java --pattern $'class UIController { $$$ static void initLogic(MainGridPane $_) { $$$ } $$$ }'

Length of output: 112



Script:

#!/bin/bash
# First, find the UIController class file.
fd "UIController.java"

# Then, if the file exists, use ast-grep to search for the initLogic method within the UIController class.
# The pattern is broadened to capture any static method named initLogic, regardless of its parameters or contents.

Length of output: 61



Script:

#!/bin/bash
# Now that we have the path to the UIController class, let's use ast-grep to search for the initLogic method.
ast-grep --lang java --pattern $'class UIController { $$$ static void initLogic($$$) { $$$ } $$$ }' --file GUI/src/main/java/ui/UIController.java

Length of output: 340



Script:

#!/bin/bash
# Correcting the ast-grep command to search for the initLogic method in the UIController class without specifying the file.
ast-grep --lang java --pattern $'class UIController { $$$ static void initLogic($$$) { $$$ } $$$ }'

Length of output: 100



Script:

#!/bin/bash
# Using ripgrep to search for the initLogic method signature in the UIController.java file.
rg "static void initLogic" GUI/src/main/java/ui/UIController.java

Length of output: 121

GUI/src/main/java/main/Drifty_GUI.java Show resolved Hide resolved
@github-actions github-actions bot removed the CI/CD 🔁 Pull Requests which update GitHub Actions code label Dec 27, 2023
coderabbitai[bot]

This comment was marked as duplicate.

Repository owner deleted a comment from coderabbitai bot Dec 27, 2023
@github-actions github-actions bot added documentation 📝 Issues/Pull Requests regarding documentation docker 🐋 Issues/Pull Requests regarding docker labels Dec 30, 2023
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b392ee9 and 66f7fb5.
Files selected for processing (2)
  • Docker/macOS Docker Build Instructions.md (1 hunks)
  • README.md (1 hunks)
Files skipped from review due to trivial changes (2)
  • Docker/macOS Docker Build Instructions.md
  • README.md

Copy link
Owner Author

@SaptarshiSarkar12 SaptarshiSarkar12 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@SaptarshiSarkar12 SaptarshiSarkar12 merged commit 698e035 into master Dec 30, 2023
35 checks passed
@SaptarshiSarkar12 SaptarshiSarkar12 deleted the 280-add-splash-screen branch December 30, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App 💻 Issues/Pull Requests which update Drifty Application Code dependencies 📦️ Pull Requests that update dependencies docker 🐋 Issues/Pull Requests regarding docker documentation 📝 Issues/Pull Requests regarding documentation feature ✨ New feature request or addition maven 📦️ Pull Requests that update Maven dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Splash screen for Drifty GUI
1 participant