Skip to content

fix: improve UI #24

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

Merged
merged 15 commits into from
May 16, 2024
Merged

fix: improve UI #24

merged 15 commits into from
May 16, 2024

Conversation

Hitesh-Kandpal
Copy link
Contributor

@Hitesh-Kandpal Hitesh-Kandpal commented May 14, 2024

Portal PR Checklist

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:

Did some changed in UI and used better components and styling, also added a title to page, and instead of local storage used session storage

Related changes:

  1. in transcript-analyzer component used primeng file upload component and did the necessary changes in all files
  2. did one change in file-processor component scss file
  3. added main title in index.html and added label in en.json file
  4. used session storage instead of local storage

Screenshots:

Screenshot 2024-05-14 at 7 27 49 PM
ui.mov

Pending actions:

N/A

Additional notes:

The reason for using session storage over local storage was that while I was continuously uploading files and then deleting them from the database for testing purposes, local storage was accumulating job IDs that had been deleted from the database. Additionally, since there is a limit of 10 in the status API for fetching statuses, the local storage, which includes old job IDs, makes it difficult to retrieve the status of recently uploaded files. Therefore, using session storage makes more sense in this scenario.

Summary by CodeRabbit

  • New Features

    • Added a file upload component in the transcript analyzer with updated event handling and styles.
    • Updated i18n translations with new keys for file upload instructions.
  • Improvements

    • Changed storage for job IDs from localStorage to sessionStorage for improved session management.
  • Bug Fixes

    • Fixed file download functionality to correctly replace specific file extensions with .md.
  • Configuration

    • Updated Redis Docker port in .env.example to 6379.
  • Refactor

    • Simplified file handling logic in the transcript analyzer component.

@Hitesh-Kandpal Hitesh-Kandpal added the Ready for review Ready for review label May 14, 2024
@Hitesh-Kandpal Hitesh-Kandpal requested a review from xixas May 14, 2024 14:12
@Hitesh-Kandpal Hitesh-Kandpal self-assigned this May 14, 2024
Copy link
Contributor

coderabbitai bot commented May 14, 2024

Walkthrough

The recent updates bring significant functional and structural enhancements to the project. Changes include transitioning from localStorage to sessionStorage for job ID storage, refining file handling and upload processes, improving error handling and internationalization, optimizing environment configuration, and enhancing service logic for better performance and reliability.

Changes

Files / Paths Change Summary
.gitignore Added *dump.rdb to ignore Redis dump files.
apps/portal/src/app/features/file.service.ts Switched from localStorage to sessionStorage for storing and retrieving jobIds.
apps/portal/src/assets/i18n/en.json Added new key-value pairs under "BUTTONS" and "UPLOAD_INFO" sections for internationalization.
apps/portal/src/app/features/file-processor/... Modified downloadFile method to replace specific file extensions with .md when saving files.
apps/portal/src/app/features/transcript-analyzer/... Replaced input element with file upload component, adjusted event handling, and updated button labels.
apps/api/src/jobs/consumers/summary/... Updated outputText assignment to include fallback message if summary generation fails.
apps/api/src/modules/summary/summary.service.ts Replaced ConfigService usage with uploadDir from src/main and updated file upload path logic.
apps/portal/src/app/features/transcript-analyzer/... Simplified file handling, removed unused properties, and switched storage for job IDs to sessionStorage.
apps/api/.env.example Updated Redis Docker port from 6397 to 6379.

🐇
In the code where changes flow,
Storage shifted, job IDs now go,
To session's fleeting, transient hold,
While files upload, new labels bold.
Redis ports and paths align,
Enhancements made, the code refined.
🎉


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.

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 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.

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: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 7521f8e and e82e650.
Files selected for processing (7)
  • apps/portal/src/app/features/file-processor/file-processor.component.scss (1 hunks)
  • apps/portal/src/app/features/file.service.ts (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.ts (2 hunks)
  • apps/portal/src/assets/i18n/en.json (1 hunks)
  • apps/portal/src/index.html (1 hunks)
Files skipped from review due to trivial changes (3)
  • apps/portal/src/app/features/file-processor/file-processor.component.scss
  • apps/portal/src/assets/i18n/en.json
  • apps/portal/src/index.html
Additional comments not posted (4)
apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss (1)

Line range hint 3-7: Styling changes for .transcript-analyzer look good.

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

2-13: The use of the PrimeNG p-fileUpload component and the addition of the summarize button enhance the UI. Good job!

apps/portal/src/app/features/file.service.ts (1)

19-19: Switching from localStorage to sessionStorage for storing job IDs is a good move to prevent the accumulation of old job IDs.

Also applies to: 24-24

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

28-32: The simplification of the onFileSelected method and the switch to sessionStorage for storing job IDs are well-implemented. The error handling in summarizeTranscript is also robust.

Also applies to: 57-59

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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between e82e650 and 86cbef6.
Files selected for processing (5)
  • apps/portal/src/app/app.component.html (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss (1 hunks)
  • apps/portal/src/assets/i18n/en.json (1 hunks)
  • apps/portal/src/index.html (1 hunks)
Files skipped from review due to trivial changes (1)
  • apps/portal/src/app/app.component.html
Files skipped from review as they are similar to previous changes (4)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss
  • apps/portal/src/assets/i18n/en.json
  • apps/portal/src/index.html

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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 86cbef6 and 95d4284.
Files selected for processing (1)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.scss

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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 95d4284 and 2b6f9e8.
Files selected for processing (3)
  • .gitignore (1 hunks)
  • apps/portal/src/app/features/file.service.ts (1 hunks)
  • apps/portal/src/assets/i18n/en.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • .gitignore
Files skipped from review as they are similar to previous changes (2)
  • apps/portal/src/app/features/file.service.ts
  • apps/portal/src/assets/i18n/en.json

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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 2b6f9e8 and 6909a22.
Files selected for processing (2)
  • apps/portal/src/app/features/file-processor/file-processor.component.ts (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html

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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 6909a22 and 69bfb59.
Files selected for processing (1)
  • apps/api/.env.example (1 hunks)
Files skipped from review due to trivial changes (1)
  • apps/api/.env.example

xixas
xixas previously approved these changes May 15, 2024
xixas
xixas previously approved these changes May 15, 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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 69bfb59 and fc3b9cc.
Files selected for processing (5)
  • apps/api/src/jobs/consumers/summary/summary.consumer.ts (1 hunks)
  • apps/api/src/modules/summary/summary.service.ts (2 hunks)
  • apps/portal/src/app/features/file-processor/file-processor.component.ts (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html (1 hunks)
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.ts (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • apps/portal/src/app/features/file-processor/file-processor.component.ts
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.html
  • apps/portal/src/app/features/transcript-analyzer/transcript-analyzer.component.ts
Additional comments not posted (2)
apps/api/src/jobs/consumers/summary/summary.consumer.ts (1)

50-52: Good addition of a fallback message for better error handling.

apps/api/src/modules/summary/summary.service.ts (1)

39-46: Good addition of a check for uploadDir and ensuring the directory exists.

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 UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between fc3b9cc and 637db24.
Files selected for processing (1)
  • apps/api/.env.example (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/api/.env.example

@xixas xixas merged commit 04667c7 into main May 16, 2024
6 checks passed
@xixas xixas deleted the REST-570 branch May 16, 2024 06:39
@coderabbitai coderabbitai bot mentioned this pull request Jun 26, 2025
10 tasks
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.

3 participants