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(service-portal): Notifications - locale updates. Add cleanstring #15239

Merged
merged 27 commits into from
Jun 18, 2024

Conversation

thordurhhh
Copy link
Member

@thordurhhh thordurhhh commented Jun 14, 2024

What

Fix locale updates. Add cleanstring

Why

Strings can have leading spaces, trailing spaces, newlines, tabs, you name it. Clean it up before serving.
Add refetch to data once locale changes, add locale change option.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Improved notification handling by adding refetch functionality when language changes.
    • Enhanced notification data sanitization by removing extra spaces.
  • Improvements

    • Added support for locale parameter in notification GraphQL queries for better localization.
  • Bug Fixes

    • Ensured data consistency in notifications based on language changes.
  • Chores

    • Updated file patterns for GraphQL files in scripts for better matching.

@thordurhhh thordurhhh added the automerge Merge this PR as soon as all checks pass label Jun 14, 2024
@thordurhhh thordurhhh requested a review from a team as a code owner June 14, 2024 13:05
Copy link
Contributor

coderabbitai bot commented Jun 14, 2024

Walkthrough

Recent updates to the service portal and notification system introduce enhanced data fetching based on language changes, string sanitization for notifications, and improved handling of GraphQL queries. Key modifications include adding the refetch functionality in React components for language consistency, the introduction of a cleanString helper for sanitizing notification content, and adjustments to GraphQL queries to include locale parameters. Additionally, specific feature flag decorators have been removed from resolvers, and the file hashing script has been updated to accommodate new GraphQL file patterns.

Changes

Files/Path Change Summary
apps/service-portal/src/components/Notifications/NotificationButton.tsx Added refetch to useGetUserNotificationsOverviewQuery and a useEffect hook to trigger refetch on lang changes.
libs/api/domains/notifications/src/utils/helpers.ts Introduced cleanString helper to sanitize notification strings in notificationMapper.
libs/service-portal/information/src/index.ts Renamed exported module 'Notifications.generated' to 'NotificationInfo.generated'.
libs/service-portal/information/src/screens/Notifications/NotificationInfo.graphql Renamed GraphQL queries to include $locale parameter.
libs/service-portal/information/src/screens/Notifications/Notifications.tsx Added useEffect to refetch data on lang changes and updated useLocale hook.
libs/api/domains/notifications/src/lib/.../notifications.resolver.ts Removed FeatureFlag decorator.
libs/api/domains/notifications/src/lib/.../notificationsList.resolver.ts Removed FeatureFlag decorator.
scripts/_hash-generated-files.sh Adjusted GraphQL file matching pattern.
scripts/ci/cache/__config.mjs Introduced GENERATED_FILES_VERSION constant for file hashing.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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.
  • 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.

@datadog-island-is
Copy link

datadog-island-is bot commented Jun 14, 2024

Datadog Report

Branch report: service-portal/notifications-locale-cleanstring
Commit report: 9075c6a
Test service: api

✅ 0 Failed, 4 Passed, 0 Skipped, 2.94s Total Time
➡️ Test Sessions change in coverage: 1 no change

Copy link
Member

@thorkellmani thorkellmani left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Actionable comments posted: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 223783c and c242c18.

Files selected for processing (4)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx (1 hunks)
  • libs/api/domains/notifications/src/utils/helpers.ts (2 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx (4 hunks)
Additional context used
Path-based instructions (4)
libs/api/domains/notifications/src/utils/helpers.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/service-portal/information/src/screens/Notifications/Notifications.graphql (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
apps/service-portal/src/components/Notifications/NotificationButton.tsx (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
libs/service-portal/information/src/screens/Notifications/Notifications.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Additional comments not posted (4)
libs/api/domains/notifications/src/utils/helpers.ts (1)

27-32: The use of cleanString in notificationMapper is a good practice for ensuring data cleanliness.

This ensures that all notification data is consistently formatted before further processing or display, which can help in preventing UI issues and improve user experience.

libs/service-portal/information/src/screens/Notifications/Notifications.graphql (1)

35-36: Adding the $locale parameter to GraphQL queries is a good practice for supporting internationalization.

This change allows the backend to serve data that is localized to the user's current language setting, enhancing the user experience by providing contextually relevant data.

Also applies to: 55-58

apps/service-portal/src/components/Notifications/NotificationButton.tsx (1)

27-45: Proper use of the lang variable to trigger refetches in response to locale changes.

This ensures that the notification data is always up-to-date with the user's preferred language, which is crucial for maintaining a good user experience in a multilingual application.

libs/service-portal/information/src/screens/Notifications/Notifications.tsx (1)

Line range hint 35-64: Efficient integration of lang to manage locale-specific data fetching.

The use of lang to control the fetching and refetching of data ensures that the content is relevant to the user’s current locale, which is essential for a global application.

Also applies to: 75-75

libs/api/domains/notifications/src/utils/helpers.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.10%. Comparing base (eb70c65) to head (5fe9c24).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #15239   +/-   ##
=======================================
  Coverage   37.10%   37.10%           
=======================================
  Files        6448     6448           
  Lines      131456   131456           
  Branches    37575    37575           
=======================================
  Hits        48781    48781           
  Misses      82675    82675           
Flag Coverage Δ
api 3.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb70c65...5fe9c24. Read the comment docs.

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c242c18 and b965cea.

Files selected for processing (1)
  • libs/api/domains/notifications/src/utils/helpers.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • libs/api/domains/notifications/src/utils/helpers.ts

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b965cea and 5af8a26.

Files selected for processing (1)
  • libs/service-portal/information/project.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • libs/service-portal/information/project.json

@thordurhhh thordurhhh removed the automerge Merge this PR as soon as all checks pass label Jun 14, 2024
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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5af8a26 and b727577.

Files selected for processing (1)
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2 hunks)
Additional context used
Path-based instructions (1)
libs/service-portal/information/src/screens/Notifications/Notifications.graphql (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Additional comments not posted (2)
libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2)

55-59: The mandatory $locale parameter in GetUserNotificationsOverview ensures that locale is always specified, aligning with localization efforts. Verify that all client calls to this query have been updated to include the $locale parameter.


35-36: The addition of the $locale parameter enhances localization support. Ensure that the backend gracefully handles cases where $locale is not provided, as it is optional here.

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5af8a26 and ae5d56a.

Files selected for processing (3)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx (1 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx (3 hunks)
Additional context used
Path-based instructions (3)
libs/service-portal/information/src/screens/Notifications/Notifications.graphql (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
apps/service-portal/src/components/Notifications/NotificationButton.tsx (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
libs/service-portal/information/src/screens/Notifications/Notifications.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Additional comments not posted (4)
libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2)

35-36: The addition of the $locale parameter to GetUserNotifications is a good enhancement for supporting localization.


55-59: Properly adding the $locale parameter to GetUserNotificationsOverview enhances the localization capability of the notifications overview.

apps/service-portal/src/components/Notifications/NotificationButton.tsx (1)

27-34: The addition of lang and refetch in the useGetUserNotificationsOverviewQuery and useEffect to handle language change is a solid implementation for dynamic localization.

Also applies to: 42-44

Verification successful

The useEffect hook correctly includes lang in its dependency array, ensuring that refetch is triggered on language change. This confirms that the implementation supports dynamic localization as intended.

  • useEffect with [lang, refetch] dependency array is correctly implemented in NotificationButton.tsx.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that `refetch` is triggered correctly on language change.
# Test: Check for the useEffect dependency array to include `lang`.
rg --type typescript "useEffect\(.*\[.*lang.*\]"

Length of output: 85



Script:

#!/bin/bash
# Description: Verify that `refetch` is triggered correctly on language change.
# Test: Check for the useEffect dependency array to include `lang`.
rg --type ts "useEffect\(.*\[.*lang.*\]"

Length of output: 42



Script:

#!/bin/bash
# Description: Verify the use of `useEffect` in NotificationButton.tsx and check if `lang` is included in the dependency array.
# Search for all useEffect hooks in the NotificationButton.tsx file.
rg --type ts "useEffect" apps/service-portal/src/components/Notifications/NotificationButton.tsx

Length of output: 195



Script:

#!/bin/bash
# Description: Extract the full implementations of useEffect hooks in NotificationButton.tsx to check if lang is included in the dependency array.
# Extract lines containing useEffect hooks and their implementations.
rg --type ts -A 10 "useEffect" apps/service-portal/src/components/Notifications/NotificationButton.tsx

Length of output: 1003

libs/service-portal/information/src/screens/Notifications/Notifications.tsx (1)

60-62: The implementation of useEffect to refetch data on language change is correctly set up with lang as a dependency, ensuring data consistency with language settings.

Verification successful

The useEffect hook with refetch and lang as dependencies is indeed present in the Notifications.tsx file, confirming the implementation to refetch data on language change.

  • refetch usage found at: libs/service-portal/information/src/screens/Notifications/Notifications.tsx
  • lang usage found at: libs/service-portal/information/src/screens/Notifications/Notifications.tsx
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the useEffect correctly triggers refetch on language change.
# Test: Check for the useEffect dependency array to include `lang`.
rg --type typescript "useEffect\(.*\[.*lang.*\]"

Length of output: 85



Script:

#!/bin/bash
# Description: Verify that the useEffect correctly triggers refetch on language change.
# Test: Check for the useEffect dependency array to include `lang`.
rg --glob '*.tsx' "useEffect\(.*\[.*lang.*\]"

Length of output: 47



Script:

#!/bin/bash
# Description: Search for all useEffect hooks and inspect their dependency arrays.
rg --glob '*.tsx' "useEffect\(.*\[" -A 3

Length of output: 2995



Script:

#!/bin/bash
# Description: Search for useEffect hooks in the Notifications.tsx file.
rg "useEffect\(.*\[" libs/service-portal/information/src/screens/Notifications/Notifications.tsx -A 3

Length of output: 103



Script:

#!/bin/bash
# Description: Search for refetch and lang usage in the Notifications.tsx file.
rg 'refetch' libs/service-portal/information/src/screens/Notifications/Notifications.tsx
rg 'lang' libs/service-portal/information/src/screens/Notifications/Notifications.tsx

Length of output: 349

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ae5d56a and 1a60cbb.

Files selected for processing (2)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx (1 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx (4 hunks)
Additional context used
Path-based instructions (2)
apps/service-portal/src/components/Notifications/NotificationButton.tsx (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
libs/service-portal/information/src/screens/Notifications/Notifications.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Additional comments not posted (2)
apps/service-portal/src/components/Notifications/NotificationButton.tsx (1)

27-27: The addition of lang and refetch from useLocale and useGetUserNotificationsOverviewQuery respectively, along with the useEffect to handle locale changes, are well implemented. This ensures the notification data is consistent with the current user's language preference.

Also applies to: 34-39, 43-45

libs/service-portal/information/src/screens/Notifications/Notifications.tsx (1)

35-35: The implementation of lang in useLocale, its addition to GraphQL queries, and the useEffect to refetch data on language changes are correctly applied. These changes ensure that the notification data is up-to-date with the current language setting, enhancing the user experience by providing localized content.

Also applies to: 57-57, 61-63, 75-75

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1a60cbb and 76f5cf0.

Files selected for processing (1)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 76f5cf0 and f6bda61.

Files selected for processing (3)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx (1 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx (9 hunks)
Files skipped from review as they are similar to previous changes (3)
  • apps/service-portal/src/components/Notifications/NotificationButton.tsx
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 825347c and bf4e3b1.

Files selected for processing (1)
  • scripts/ci/cache/__config.mjs (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • scripts/ci/cache/__config.mjs

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bf4e3b1 and 17e5673.

Files selected for processing (2)
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql (2 hunks)
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx (5 hunks)
Files skipped from review as they are similar to previous changes (2)
  • libs/service-portal/information/src/screens/Notifications/Notifications.graphql
  • libs/service-portal/information/src/screens/Notifications/Notifications.tsx

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.

Actionable comments posted: 0

Outside diff range and nitpick comments (3)
libs/api/domains/notifications/src/lib/notificationsList.resolver.ts (2)

Line range hint 40-40: The @Audit() decorator usage is incorrectly placed directly above the method parameter, which is not allowed. Decorators in TypeScript are applicable to classes, methods, or properties but not to method parameters unless explicitly enabled.

- @Audit()
- async getNotifications(
+ async getNotifications(
+ @Audit()

Reposition the @Audit() decorator to just above the method declaration to resolve this issue.


Line range hint 49-49: The placement of decorators on field resolvers is incorrect. Decorators should not be placed directly above the method parameters but should instead decorate the method itself.

- @ResolveField('unseenCount', () => Int, {
-   nullable: true,
- })
- async resolveNotificationsUnseenCount(
+ @ResolveField('unseenCount', () => Int, { nullable: true })
+ async resolveNotificationsUnseenCount(

Apply this change for all instances where decorators are used incorrectly on method parameters in this file.

Also applies to: 52-52, 75-75, 85-85, 97-97, 99-99

libs/api/domains/notifications/src/lib/notifications.resolver.ts (1)

Line range hint 28-28: The placement of decorators on method parameters is incorrect throughout this file. Decorators should be placed directly above the method declaration, not on the parameters.

- @Audit()
- async getNotification(
+ async getNotification(
+ @Audit()

This change should be applied to all instances where decorators are incorrectly placed on method parameters in this file.

Also applies to: 36-36, 37-37, 39-39, 80-80, 101-101, 122-122, 123-123, 125-125

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 17e5673 and 2f28224.

Files selected for processing (2)
  • libs/api/domains/notifications/src/lib/notifications.resolver.ts (2 hunks)
  • libs/api/domains/notifications/src/lib/notificationsList.resolver.ts (2 hunks)
Additional context used
Path-based instructions (2)
libs/api/domains/notifications/src/lib/notificationsList.resolver.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/api/domains/notifications/src/lib/notifications.resolver.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Biome
libs/api/domains/notifications/src/lib/notificationsList.resolver.ts

[error] 40-40: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 49-49: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 50-50: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 52-52: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 75-75: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 85-85: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 97-97: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 99-99: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

libs/api/domains/notifications/src/lib/notifications.resolver.ts

[error] 28-28: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 36-36: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 37-37: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 39-39: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 80-80: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 101-101: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 122-122: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 123-123: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.


[error] 125-125: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2f28224 and b36f87c.

Files selected for processing (1)
  • scripts/_hash-generated-files.sh (1 hunks)
Files skipped from review due to trivial changes (1)
  • scripts/_hash-generated-files.sh

gudjong and others added 4 commits June 18, 2024 12:11
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* feat: buttons at top should not be sticky

* feat: add empty state for notifications

* fix: make sure to update unreadCount in inbox when fetching next page

* feat: add fallback icon for notifications

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix: hash generated files

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>
@lodmfjord lodmfjord requested review from a team as code owners June 18, 2024 12:13
@lodmfjord lodmfjord removed request for a team June 18, 2024 12:14
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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b36f87c and db50472.

Files selected for processing (1)
  • scripts/ci/cache/__config.mjs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • scripts/ci/cache/__config.mjs

@thordurhhh thordurhhh added the automerge Merge this PR as soon as all checks pass label Jun 18, 2024
@kodiakhq kodiakhq bot merged commit a37e90f into main Jun 18, 2024
28 checks passed
@kodiakhq kodiakhq bot deleted the service-portal/notifications-locale-cleanstring branch June 18, 2024 13:34
thordurhhh added a commit that referenced this pull request Jun 18, 2024
…15239)

* Fix locale updates. Add cleanstring

* update string clean

* Update packagejson

* Update query

* Update query

* Add lang option

* Test

* Fix

* Add locale

* Test name update

* fix: force generated files

* chore: nx format:write update dirty files

* Revert test

* Remove ff

* fix: hash generated files

* fix(j-s): Null Service Reference (#15247)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat(native-app): Notifications final improvements (#15240)

* feat: buttons at top should not be sticky

* feat: add empty state for notifications

* fix: make sure to update unreadCount in inbox when fetching next page

* feat: add fallback icon for notifications

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat(consultation-portal): KAM-2522: PowerBI report added (#15251)

* fix: hash generated files (#15253)

* fix: hash generated files

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>

* fix: remove file

* Update __config.mjs

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: lommi <jonorn@gmail.com>
Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: Guðjón Guðjónsson <gudjon@kolibri.is>
Co-authored-by: Þórey Jóna <thoreyjona@gmail.com>
Co-authored-by: Karl Arnar Ægisson <korsbacka@gmail.com>
kodiakhq bot added a commit that referenced this pull request Jun 18, 2024
…15255)

* fix(documents-v2): Add download URL to detail document v2 (#15194)

* fix(service-portal): Update notification icon styling (#15219)

* Update notification icon styling

* Add option to remove button docline

* fix(service-portal): Notifications - locale updates. Add cleanstring (#15239)

* Fix locale updates. Add cleanstring

* update string clean

* Update packagejson

* Update query

* Update query

* Add lang option

* Test

* Fix

* Add locale

* Test name update

* fix: force generated files

* chore: nx format:write update dirty files

* Revert test

* Remove ff

* fix: hash generated files

* fix(j-s): Null Service Reference (#15247)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat(native-app): Notifications final improvements (#15240)

* feat: buttons at top should not be sticky

* feat: add empty state for notifications

* fix: make sure to update unreadCount in inbox when fetching next page

* feat: add fallback icon for notifications

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat(consultation-portal): KAM-2522: PowerBI report added (#15251)

* fix: hash generated files (#15253)

* fix: hash generated files

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>

* fix: remove file

* Update __config.mjs

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: lommi <jonorn@gmail.com>
Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: Guðjón Guðjónsson <gudjon@kolibri.is>
Co-authored-by: Þórey Jóna <thoreyjona@gmail.com>
Co-authored-by: Karl Arnar Ægisson <korsbacka@gmail.com>

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: lommi <jonorn@gmail.com>
Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: Guðjón Guðjónsson <gudjon@kolibri.is>
Co-authored-by: Þórey Jóna <thoreyjona@gmail.com>
Co-authored-by: Karl Arnar Ægisson <korsbacka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants