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(consultation-portal): KAM-2522: PowerBI report added #15251

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

karlarnar
Copy link
Contributor

@karlarnar karlarnar commented Jun 18, 2024

Add statistics to samráðsgátt

https://veflausnir.atlassian.net/browse/KAM-2514
https://veflausnir.atlassian.net/browse/KAM-2522

What

  • Statistics page that shows a report from Power BI
  • NotFound and LinkExpired pages to redirect user for better handling of email verification errors

Why

Specify why you need to achieve this

Screenshots / Gifs

image
image
image

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

    • Added "Statistics" and "Advices" to the navigation menu.
    • Introduced a new PowerBI component for embedding Power BI reports.
    • Added a new statistics section with a dedicated StatisticsScreen component.
    • Created new screens for handling expired links and not found pages.
  • Improvements

    • Enhanced SEO metadata and breadcrumbs for the statistics section.
  • Bug Fixes

    • Removed deprecated and commented-out navigation items.

@karlarnar karlarnar requested a review from a team as a code owner June 18, 2024 09:50
Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Walkthrough

The updates primarily focus on enhancing the consultation-portal, including new screens for expired links and user-not-found pages, a statistics section featuring Power BI integration, and an updated navigation menu. Key components and JSON configurations have been added to support the new functionalities and provide necessary metadata for SEO and layout management.

Changes

File(s) Summary
.../Layout/Layout.json Added "Tölfræði" item to the navigation menu.
.../Layout/components/MenuItems/MenuItems.ts Removed old "Tölfræði" comment; added "Statistics" and "Advices" menu items.
.../PowerBI/PowerBI.tsx, .../PowerBI/index.ts Introduced PowerBI component for embedding Power BI reports.
.../pages/tolfraedi/index.tsx New page for rendering StatisticsScreen.
.../pages/user/link-expired/index.tsx New page for expired link handling, rendering LinkExpiredScreen.
.../pages/user/not-found/index.tsx New page for user-not-found handling, rendering NotFoundScreen.
.../screens/EmailVerified/EmailVerified.json Added new sections (linkExpired, notFound) with specific texts and metadata.
.../screens/EmailVerified/LinkExpired.tsx Introduced LinkExpiredScreen component for expired link message display.
.../screens/EmailVerified/NotFound.tsx Introduced NotFoundScreen component for custom not found page.
.../screens/Statistics/Statistics.json Introduced JSON data for the statistics section with SEO information and breadcrumbs.
.../screens/Statistics/Statistics.tsx Introduced StatisticsScreen component to render statistics using PowerBIComponent.

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.

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 34c0031 and c22f2f1.

Files selected for processing (12)
  • apps/consultation-portal/components/Layout/Layout.json (1 hunks)
  • apps/consultation-portal/components/Layout/components/Menu/components/MenuItems/MenuItems.ts (1 hunks)
  • apps/consultation-portal/components/PowerBI/PowerBI.tsx (1 hunks)
  • apps/consultation-portal/components/PowerBI/index.ts (1 hunks)
  • apps/consultation-portal/pages/tolfraedi/index.tsx (1 hunks)
  • apps/consultation-portal/pages/user/link-expired/index.tsx (1 hunks)
  • apps/consultation-portal/pages/user/not-found/index.tsx (1 hunks)
  • apps/consultation-portal/screens/EmailVerified/EmailVerified.json (1 hunks)
  • apps/consultation-portal/screens/EmailVerified/LinkExpired.tsx (1 hunks)
  • apps/consultation-portal/screens/EmailVerified/NotFound.tsx (1 hunks)
  • apps/consultation-portal/screens/Statistics/Statistics.json (1 hunks)
  • apps/consultation-portal/screens/Statistics/Statistics.tsx (1 hunks)
Files skipped from review due to trivial changes (5)
  • apps/consultation-portal/components/Layout/Layout.json
  • apps/consultation-portal/pages/tolfraedi/index.tsx
  • apps/consultation-portal/pages/user/link-expired/index.tsx
  • apps/consultation-portal/pages/user/not-found/index.tsx
  • apps/consultation-portal/screens/Statistics/Statistics.json
Additional context used
Path-based instructions (7)
apps/consultation-portal/components/PowerBI/index.ts (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."
apps/consultation-portal/components/Layout/components/Menu/components/MenuItems/MenuItems.ts (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."
apps/consultation-portal/screens/Statistics/Statistics.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."
apps/consultation-portal/components/PowerBI/PowerBI.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."
apps/consultation-portal/screens/EmailVerified/EmailVerified.json (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."
apps/consultation-portal/screens/EmailVerified/NotFound.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."
apps/consultation-portal/screens/EmailVerified/LinkExpired.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."
Gitleaks
apps/consultation-portal/components/PowerBI/PowerBI.tsx

21-21: Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics. (grafana-api-key)

Additional comments not posted (7)
apps/consultation-portal/components/PowerBI/index.ts (1)

3-5: The dynamic import of PowerBI with SSR disabled is appropriate for client-specific components.

apps/consultation-portal/components/Layout/components/Menu/components/MenuItems/MenuItems.ts (1)

19-23: The addition of 'Statistics' and 'Advices' to the menu items aligns with the new features introduced in the portal.

apps/consultation-portal/screens/Statistics/Statistics.tsx (1)

7-32: The implementation of the StatisticsScreen is well-structured with appropriate SEO and breadcrumbs setup, and correct usage of the PowerBIComponent.

apps/consultation-portal/screens/EmailVerified/EmailVerified.json (2)

12-21: The linkExpired JSON configuration is well-structured and provides comprehensive SEO and user interface text. Ensure that the provided URLs and texts align with the application's routing and content strategy.


22-30: The notFound JSON configuration is correctly structured. Confirm that the SEO titles and URL paths are consistent with the application's error handling conventions.

apps/consultation-portal/screens/EmailVerified/NotFound.tsx (1)

12-46: The NotFoundScreen component is well-implemented, utilizing localization effectively for dynamic text rendering and SEO configuration. The use of grid layout and styling props is consistent with modern React practices. Ensure that the ArrowLink correctly routes to the intended destination, typically the homepage in this context.

apps/consultation-portal/screens/EmailVerified/LinkExpired.tsx (1)

12-46: The LinkExpiredScreen component is correctly implemented, with clear use of localization for dynamic content and SEO. The layout and UI components are used consistently with the application's design system. Verify that the ArrowLink is directing users to the correct recovery or home page as intended.

Copy link
Member

@diljath diljath left a comment

Choose a reason for hiding this comment

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

LGTM

@karlarnar karlarnar added the automerge Merge this PR as soon as all checks pass label Jun 18, 2024
@kodiakhq kodiakhq bot merged commit 89f9537 into main Jun 18, 2024
23 checks passed
@kodiakhq kodiakhq bot deleted the KAM-2522-powerbi-veisla branch June 18, 2024 10:30
kodiakhq bot 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>
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.

2 participants