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(form-system): Application #15444

Open
wants to merge 162 commits into
base: main
Choose a base branch
from
Open

feat(form-system): Application #15444

wants to merge 162 commits into from

Conversation

Hyosam
Copy link
Contributor

@Hyosam Hyosam commented Jul 4, 2024

...

  • An initial shell for the application part of the form-system project within apps/portals/form-system
  • Two libraries to be shared by both the new app and the form building part of the form-system project:
  • graphql library
  • Ui library

Checklist:

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

Summary by CodeRabbit

  • New Features

    • Added a new service for form system integration.
    • Enhanced the LimitedAccessFileController to support specific subpoena retrieval based on IDs.
  • Improvements

    • Updated ESLint configuration for stricter module boundary rules and improved TypeScript handling.
    • Adjusted logging and formatting in the FileController for better readability.

Hyosam and others added 30 commits February 1, 2024 15:46
…cript, removed all console.logs and removed all code that was commented out
Hyosam and others added 23 commits October 22, 2024 11:08
This commit adds the form system API setup to the uber-charts/islandis.ts file. This allows the form system service to be used in the application.
@Hyosam Hyosam requested review from a team as code owners December 19, 2024 11:33
Copy link

gitguardian bot commented Dec 19, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - X-API-Key Secret fc7f69d apps/form-builder/services/translationStation.tsx View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

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

🧹 Nitpick comments (2)
apps/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.ts (2)

9-9: Remove unused import.

The Query decorator is imported but not used anywhere in the controller.

-  Query,

23-23: Remove unused import.

The SubpoenaType type is imported but not used in the controller.

-import type { SubpoenaType, User } from '@island.is/judicial-system/types'
+import type { User } from '@island.is/judicial-system/types'
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c747e5b and d1d30ed.

📒 Files selected for processing (4)
  • .eslintrc.json (1 hunks)
  • apps/api/infra/api.ts (2 hunks)
  • apps/judicial-system/api/src/app/modules/file/file.controller.ts (2 hunks)
  • apps/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.ts (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/judicial-system/api/src/app/modules/file/file.controller.ts
🧰 Additional context used
📓 Path-based instructions (2)
apps/api/infra/api.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/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.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."
🔇 Additional comments (2)
.eslintrc.json (1)

45-45: LGTM!

The addition of lib:form-system to the scope:portals-admin dependencies aligns with the PR objectives for the form-system project integration.

apps/api/infra/api.ts (1)

68-68: LGTM!

The addition of formSystemService parameter aligns with the form-system project integration.

Comment on lines +201 to +207
dev: 'http://localhost:3434',
staging: '',
prod: '',
},
// FORM_SYSTEM_API_BASE_PATH: ref(
// (h) => `http://${h.svc(services.formSystemService)}`,
// ),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Review environment configuration values.

There are several concerns with the current configuration:

  1. Staging and prod environments have empty string values
  2. Development environment uses a hardcoded localhost URL
  3. There's a commented-out configuration that might be the intended approach using the service reference

Consider either:

  1. Providing proper URLs for staging and prod environments
  2. Using the service reference approach as shown in the commented code
-      FORM_SYSTEM_API_BASE_PATH: {
-        dev: 'http://localhost:3434',
-        staging: '',
-        prod: '',
-      },
-      // FORM_SYSTEM_API_BASE_PATH: ref(
-      //   (h) => `http://${h.svc(services.formSystemService)}`,
-      // ),
+      FORM_SYSTEM_API_BASE_PATH: ref(
+        (h) => `http://${h.svc(services.formSystemService)}`,
+      ),

Committable suggestion skipped: line range outside the PR's diff.

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.

4 participants