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

Upgraded to Ember 4.12 #144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simonisinger
Copy link

@simonisinger simonisinger commented Oct 10, 2023

also refactored the component logic to the class structure und removed ember-uuid as dependency

Summary by CodeRabbit

  • New Features

    • Enhanced the place autocomplete field to support custom block content.
  • Refactor

    • Replaced ember-uuid library with native crypto.randomUUID() for session token generation.
    • Updated component class syntax to ES6 and improved computed properties and actions decorators.
  • Documentation

    • Corrected JSDoc comments to reflect accurate return types.
  • Style

    • Adjusted TailwindCSS configuration to align with latest best practices.

@coderabbitai
Copy link

coderabbitai bot commented Oct 10, 2023

Walkthrough

The update streamlines the codebase by removing an external dependency for UUID generation in favor of a native JavaScript function, enhances a template to support block content, and refines documentation and configuration. The changes modernize the code, improve maintainability, and embrace newer language features and best practices.

Changes

File Path Change Summary
addon-test-support/.../google-autocomplete-session-token.js Replaced ember-uuid with native crypto.randomUUID() for UUID generation.
addon/components/place-autocomplete-field.hbs (x2) Added conditional block rendering and event handlers for input elements.
addon/components/place-autocomplete-field.js Updated import path, converted to ES6 class, and refactored computed properties and actions.
addon/services/.../manager.js Updated JSDoc comment for removePlacesAutoCompleteContainersIfRequired method.
tests/dummy/app/styles/tailwind.config.js Removed purge, added content, and removed variants properties.

🌼 In the code garden's spring, we prune and we tweak,
🐇 With a hop and a skip, the future we seek.
🌟 Refactoring code, with less of a bound,
🎉 Celebrate changes, where progress is found.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

Note: For conversation with the bot, please use the review comments on code diffs or files.

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

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.

Review Status

Actionable comments generated: 3

Commits Files that changed from the base of the PR and between 8fdd032 and e3b4e0e.
Files ignored due to filter (3)
  • package.json
  • tests/dummy/config/optional-features.json
  • yarn.lock
Files selected for processing (5)
  • addon-test-support/google-autocomplete-session-token.js (1 hunks)
  • addon/components/place-autocomplete-field.hbs (1 hunks)
  • addon/components/place-autocomplete-field.js (13 hunks)
  • addon/services/google-place-autocomplete/manager.js (1 hunks)
  • tests/dummy/app/styles/tailwind.config.js (1 hunks)
Files skipped from review due to trivial changes (3)
  • addon/components/place-autocomplete-field.hbs
  • addon/components/place-autocomplete-field.js
  • addon/services/google-place-autocomplete/manager.js
Additional comments (Suppressed): 1
tests/dummy/app/styles/tailwind.config.js (1)
  • 1-13: The purge and variants properties have been removed and replaced with the content property. This change is in line with Tailwind CSS v2.0, where the purge option has been renamed to content. Ensure that this change doesn't affect the styles in your application and that all the necessary files are included in the content array for purging unused styles.
-  purge: [],
+  content: [
+    'tests/dummy/app/**/*.hbs'
+  ],

Also, the removal of the variants property should be verified to ensure that no custom variants are being used in the application. If there are custom variants, they should be added back.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e3b4e0e and bba0606.
Files selected for processing (1)
  • addon/components/place-autocomplete-field.hbs (1 hunks)
Additional comments: 1
addon/components/place-autocomplete-field.hbs (1)
  • 1-14: The template has been updated to support block usage, which is a common pattern in modern Ember applications to provide more flexibility to the users of the component. The use of has-block to conditionally yield content is correct and aligns with Ember's templating best practices. The event handlers for blur and input are also correctly attached using the on modifier. However, ensure that the onBlur method and the mut helper are properly defined and available in the component's JavaScript file.

@veelci
Copy link
Contributor

veelci commented Sep 12, 2024

@esbanarango Could you please review these changes?

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