Skip to content

fix: primeng components #80

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kshitij-k-osmosys
Copy link
Contributor

@kshitij-k-osmosys kshitij-k-osmosys commented Jun 26, 2025

Portal PR Checklist

Task Link

Osmosys Developers must include the Pinestem task link in the PR.

REST-1594

Pre-requisites

  • I have gone through the Contributing guidelines for Submitting a Pull Request (PR) and ensured that this is not a duplicate PR.
  • I have performed preliminary testing to ensure that any existing features are not impacted and any new features are working as expected.

PR Details

PR details have been updated as per the given format (see below)

  • PR title adheres to the format specified in guidelines (e.g., feat: add admin login page)
  • Description has been added
  • Related changes have been added (optional)
  • Screenshots have been added (optional)
  • Pending actions have been added (optional)
  • Any other additional notes have been added (optional)

Additional Information

  • Appropriate label(s) have been added (ready for review should be added if the PR is ready to be reviewed)
  • Assignee(s) and reviewer(s) have been added (optional)

Description:

Update primeng components and restore portal UI as it was before update

Related changes:

  • Update deprecated primeng component Messages to active component Message
  • Update html to use primeng v19 based tags: p-message & p-fileupload
  • Add css to center the buttons present in p-fileupload-header
  • Display text directly in message component
  • Using ng-template was not rendering text so directly added text in p-message component
  • Use simple variant for p-message as the message pill was not centering properly
  • Test on local and docker environment

Screenshots:

Landing Page
image

Upload Transcripts
image

Error Message
image

Summary by CodeRabbit

  • Style

    • Improved alignment and layout of the file upload header and informational messages for a more polished appearance.
  • Bug Fixes

    • Resolved issues with the display of informational messages by updating message components and imports for better compatibility and clarity.

Copy link
Contributor

coderabbitai bot commented Jun 26, 2025

Walkthrough

The changes update the transcript analyzer component to use the latest PrimeNG file upload and message components, replacing deprecated tags and adjusting the template structure. Supporting module imports and styles are also updated to match these changes, with minor layout adjustments for improved alignment and display.

Changes

File(s) Change Summary
apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html Replaced <p-fileUpload> with <p-fileupload>, updated message display from <p-messages> to <p-message>.
apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss Added flexbox styling for .p-fileupload-header to center and arrange content vertically.
apps/portal/src/app/primeng.module.ts Swapped MessagesModule for MessageModule in imports and module array.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TranscriptAnalyzerComponent
    participant PrimeNG_FileUpload
    participant PrimeNG_Message

    User->>TranscriptAnalyzerComponent: Loads component
    TranscriptAnalyzerComponent->>PrimeNG_FileUpload: Renders <p-fileupload>
    User->>PrimeNG_FileUpload: Selects file
    PrimeNG_FileUpload->>TranscriptAnalyzerComponent: Triggers file upload event
    TranscriptAnalyzerComponent->>PrimeNG_Message: Displays info messages
    User->>TranscriptAnalyzerComponent: Clicks summarize button
Loading

Possibly related PRs

  • build: upgrade to angular 19 #78: Updates deprecated PrimeNG component usage in transcript-analyzer, directly related to the changes in this PR.
  • fix: improve UI #24: Refactors file upload UI in transcript-analyzer, indicating overlap in component modification and UI logic.

Suggested reviewers

  • osm-vishnukyatannawar

Poem

A carrot for code, a hop for delight,
New tags in the template, shiny and bright!
Messages now singular, flexbox aligns,
Uploads and info in orderly lines.
With every fresh merge, this bunny will cheer—
PrimeNG improved, the UI’s crystal clear!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

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
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 comments (1)
apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (1)

3-15: Explicitly switch FileUpload to mode="basic" to avoid accidental HTTP calls.

p-fileupload defaults to advanced mode, which still prepares an HTTP request even if you hide the Upload button and leave url="".
Setting the component to basic clarifies intent (client-side only) and prevents future regressions if someone re-enables the button.

-    <p-fileupload
+    <p-fileupload
+      mode="basic"
🧹 Nitpick comments (1)
apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss (1)

15-19: Scope header styling to the feature to avoid leaking into other uploads.

Styling the bare .p-fileupload-header selector applies globally; any other file-upload anywhere in the portal will inherit this centering.
Prefixing with the feature container keeps the rule local and future-proof.

-.p-fileupload-header {
+.transcript-analyzer .p-fileupload-header {
   display: flex;
   flex-direction: column;
   align-items: center;
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 16cf5fe and cbe6303.

📒 Files selected for processing (3)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (2 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss (1 hunks)
  • apps/portal/src/app/primeng.module.ts (2 hunks)
🔇 Additional comments (2)
apps/portal/src/app/primeng.module.ts (1)

4-4: PrimeNG migration looks correct – double-check that MessagesModule is fully removed.

Importing MessageModule and wiring it into the modules array is the right move for v19.
Just make sure no leftover references to MessagesModule (or <p-messages>) remain elsewhere in the project; otherwise the app will compile but throw a template error at runtime.

Also applies to: 14-14

apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (1)

16-29: Nice replacement of <p-messages> with per-pill <p-message> components.

The new structure is simpler, translation-friendly, and works with PrimeNG v19 variants.
No concerns here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for review Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant