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

Fix demo styles for Vaadin 24.5 #89

Merged
merged 6 commits into from
Dec 18, 2024
Merged

Fix demo styles for Vaadin 24.5 #89

merged 6 commits into from
Dec 18, 2024

Conversation

javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Dec 11, 2024

It must be [part~='date'] instead of [part='date']. I also updated the configuration for Vaadin 24.5.
Whatever the rabbit says after me is a lie.

Summary by CodeRabbit

  • Chores
    • Updated .gitignore to include the src/main/frontend directory.
  • New Features
    • Updated vaadin.version from 24.4.4 to 24.5.0.
    • Updated webdrivermanager dependency from 3.8.1 to 5.9.2.
    • Added a new demo-jar profile for creating a test jar.
  • Style
    • Modified CSS selectors in test_year-month-calendar.css for improved styling of holiday and weekend classes.

Copy link

coderabbitai bot commented Dec 11, 2024

Walkthrough

This pull request introduces several changes across multiple files. The .gitignore file is updated to include the src/main/frontend directory for exclusion from version control. The pom.xml file sees version updates for vaadin.version and webdrivermanager, along with modifications to the Jetty plugin configuration and the addition of a new demo-jar profile. Additionally, CSS selectors in test_year-month-calendar.css are altered to adjust styling based on attribute presence.

Changes

File Change Summary
.gitignore Added entry for src/main/frontend to ignore this directory. Retained entry for src/main/dev-bundle.
pom.xml Updated vaadin.version from 24.4.4 to 24.5.0; updated webdrivermanager from 3.8.1 to 5.9.2; removed <scanIntervalSeconds> from jetty-maven-plugin and added <systemProperties> with <vaadin.frontend.hotdeploy> set to true; added demo-jar profile for maven-jar-plugin.
src/test/resources/META-INF/frontend/styles/test_year-month-calendar.css Updated CSS selectors from [part='date'] to [part~='date'] for .holiday, .holiday::before, and .weekend.

Possibly related PRs


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

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
pom.xml (1)

Exclusion patterns in demo-jar profile need adjustment

The current exclusion patterns don't fully cover all test-related files while potentially over-excluding demo content. Specifically:

  • LocaleSelector.java is not excluded but appears to be a test utility
  • The pattern **/test/* won't catch SerializationTest.java as it's in test/ directory
  • Several demo files like YearDemo.java, MonthDemo.java might be accidentally excluded if they're meant to be included in the demo jar

Suggested adjustments to the exclusion patterns:

  • Add **/Test*.class to catch test classes like TestUtils
  • Add **/*Test.class to catch classes ending with Test
  • Remove or adjust patterns that might exclude intended demo content
  • Consider explicitly including demo patterns instead of excluding test patterns
🔗 Analysis chain

Line range hint 445-483: Verify demo-jar exclusion patterns

The new profile creates a demo jar by excluding test classes. Please verify that:

  1. All test-related classes are properly excluded
  2. Demo-specific classes that should be included aren't accidentally excluded

Run this script to analyze the exclusion patterns:


Let me generate another script to check the actual exclusion patterns in the pom.xml to compare against the files we found:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify demo-jar exclusion patterns

# Find all test and demo-related classes
echo "Listing all test and demo-related classes..."
fd -e java -E "target/*" | rg -i "(test|demo|it)"

# Check for potential naming conflicts with exclusion patterns
echo "Checking for potential naming conflicts..."
fd -e java -E "target/*" | rg -i "^.*(Test|Demo|IT).*\.java$"

Length of output: 2185


Script:

#!/bin/bash
# Get the exclusion patterns from pom.xml
echo "Checking exclusion patterns in pom.xml..."
rg -A 5 "<excludes>" pom.xml

# List all files in src/test that are not in the demo packages
echo -e "\nFiles in test that are not demos:"
fd -e java -E "target/*" . src/test | rg -v "(Demo|DemoView|DemoLayout)"

Length of output: 1137

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a279a4e and 400848e.

📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • pom.xml (3 hunks)
  • src/test/resources/META-INF/frontend/styles/test_year-month-calendar.css (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .gitignore
  • src/test/resources/META-INF/frontend/styles/test_year-month-calendar.css
🔇 Additional comments (2)
pom.xml (2)

245-247: LGTM: Development optimization added

The addition of vaadin.frontend.hotdeploy will improve the development experience by enabling hot reloading of frontend changes.


12-12: Verify compatibility with updated dependencies

The version updates include:

  • Vaadin: 24.4.4 → 24.5.0 (minor version update)
  • webdrivermanager: 3.8.1 → 5.9.2 (major version update)

While the Vaadin update aligns with the PR objective, the major version jump in webdrivermanager might affect the test infrastructure.

Run this script to check for potential breaking changes:

Also applies to: 153-153

✅ Verification successful

The search results show that WebDriverManager is used in a straightforward way in AbstractViewTest.java, with a simple setup call: WebDriverManager.chromedriver().setup(). This basic usage pattern is well-supported across major versions of WebDriverManager, and the upgrade from 3.8.1 to 5.9.2 doesn't affect this particular usage.

Version updates appear safe for the codebase

The dependency updates look compatible with the current implementation:

  • Vaadin 24.5.0 is a minor version update focused on the demo styles (aligned with PR objective)
  • WebDriverManager usage is limited to basic Chrome driver setup which is stable across versions
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for breaking changes in webdrivermanager upgrade

# Search for webdrivermanager usage in test files
echo "Searching for WebDriverManager usage patterns..."
rg -A 5 "WebDriverManager" 

# Look for any TODO/FIXME comments in test files that might be related
echo "Checking for related TODO/FIXME comments in tests..."
rg -i "todo|fixme|hack|xxx" ".*Test\.java$"

Length of output: 1505

Copy link
Member

@paodb paodb left a comment

Choose a reason for hiding this comment

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

LGTM

@paodb paodb merged commit bc84ab0 into master Dec 18, 2024
4 checks passed
@paodb paodb deleted the fix-88 branch December 18, 2024 15:41
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