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

Stage #8751

Merged
merged 192 commits into from
Jan 25, 2025
Merged

Stage #8751

merged 192 commits into from
Jan 25, 2025

Conversation

evereq
Copy link
Member

@evereq evereq commented Jan 24, 2025

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


samuelmbabhazi and others added 30 commits January 3, 2025 17:26
* chore(deps): remove pm2 (^5.3.1) as it's no longer needed

* chore: remove unused pm2bootstrap.ts files & commands

* chore(env): remove PM2-related variables from multiple .env files

* chore(ci): remove PM2-related secrets from YAML configuration files

* fix(cspell): typo spelling :-)

* fix(cspell): typo spelling :-)

* Update Dockerfile

---------

Co-authored-by: Ruslan Konviser <evereq@gmail.com>
…ts-relations

[Fix] Dashboard Relation and Widget Module
* refactor: window management and electron store

Moves window management related code into a dedicated directory.

Removes electron-log and type definitions for electron store.  Electron store is now handled globally in a dedicated module.  Console logging will be handled by the renderer process.

* refactor: store and adds logger utility

Moves store related services into a dedicated store directory.

Introduces a new logger utility for better logging and debugging.  The logger is initialized and setup for Electron.

* refactor: desktop store to use core services

Replaces direct `electron-store` usage with core services for managing application settings, configurations, authentication, and project information.

This change improves code organization, reduces redundancy, and promotes consistency with the core application logic. It centralizes data management and simplifies updates to the stored data.

* refactor: config management and logging

Centralizes environment variable assignment to `environment.ts`.

Improves theme preference handling by simplifying the logic and setting a default theme if no setting exists.

Updates server start logic to directly update config store instead of using a temporary object.

Moves logging setup and node modules path output to after environment setup.

Removes redundant `electron-log` imports and uses `@gauzy/desktop-core` logger.

Refactors and simplifies setting default config by using `LocalStore.setAllDefaultConfig`.

Simplifies timer duration update logging.

* feat(desktop-core): add optional db field to IConfig interface

- Introduced an optional `db` property to the `IConfig` interface to allow for database configuration specifications.
- This change enables more flexible configurations within the desktop core setup.
…ster

chore(deps): #8701 remove angular2-toaster package
rahul-rocket and others added 7 commits January 24, 2025 18:30
[Refactor] Config Loader & File Provider
* feat: scaffolding videos ui package

Generate videos ui plugin package using NX tools

* feat: adds video tab to employee activity page

Integrates the `@gauzy/videos-ui` plugin to display employee videos within the activity tab section.

This adds a new "Videos" tab alongside screenshots, app activity, and URLs, allowing for comprehensive tracking of employee activity.  The tab's content is loaded from the `VideoUiModule` and is accessible under the 'time-activity' location.  Permissions for the new tab are consistent with other activity tracking features.

* feat: implements vertical video list view

Adds an input to the video list component to allow switching to a vertical layout.
Updates styling for both the video list and individual video items to support vertical orientation.
Modifies the video detail page to display the video list vertically.

* feat: improves video detail page UI

Adds a "more actions" icon to the video title area.

Sets a minimum width for the video list to prevent layout issues.

Updates the video detail page title to be more concise.

* feat: adds action buttons to video components

Introduces action buttons for common video operations like download, edit, share, and delete.

This change improves the user experience by providing quick access to these actions directly within the video list and detail views.  The download button is displayed prominently, while other actions are grouped under a menu.

* feat: implements video edit and delete actions

Adds edit and delete actions to the video list.

Includes a confirmation dialog before deleting a video.
Updates the video details page to use change detection.
Adds toast notifications for successful updates and deletions.

* feat: formats video duration in video item component

Applies the `durationFormat` pipe to the displayed video duration.  This improves the readability of the duration.

* fix: video navigation on details page

Handles route reuse strategy to navigate correctly to video details.

Previously, navigating between videos on the details page would result in incorrect routing due to route reuse. This change updates the navigation logic to account for the route reuse strategy, ensuring consistent navigation behavior.

* refactor: video edit component to shared module

Moves the `VideoEditComponent` from the `video-edit` feature module to the `shared/ui` module.

This change improves code reusability and organization by placing the video edit component in a shared location, making it accessible to other modules.

* feat: implements video metadata

Adds dialogs for viewing video metadata.

Updates the video action buttons to open the respective dialogs.

* fix: use custom video sharing with Web Share API

Uses the Web Share API for sharing videos directly from the browser.

This change adds use the native Web Share API.  The share button is now dynamically hidden if the user's browser does not support the Web Share API.

* feat: improves video sharing with toast notifications

Replaces console logs with toast notifications for user feedback during video sharing.  This provides more informative messages for share success, cancellation, errors, and clipboard copy.  Also removes unnecessary share data from the share tracking event.

* fix: video player width and removes console log

Sets a maximum width for the video player to prevent it from overflowing its container.

Removes a debug console log from the video update effect.

* feat: adds video sharing functionality

Implements sharing videos via Web Share API.

Adds a new action, effect, and service to handle sharing.
Updates the video component and video item component to use the new functionality.

* feat: adds video download functionality

Implements video download feature using a download queue service.

Adds actions, effects, and UI elements to support adding and removing videos from the queue.
Integrates a download manager component to display and manage queued downloads.
Updates the video player and video item components to trigger the download action.

* fix: refactors download queue observables

Renames BehaviorSubject properties to use a leading underscore for internal state management. This improves code clarity and consistency.

* fix: duplicate downloads in video UI

Handles empty or null URL input and prevents adding duplicate URLs to the download queue. Cancels ongoing downloads before removing them from the queue.  Improves download status check by handling potentially missing download data.

* feat: improves video download manager UI/UX

Redesigns the video download manager to enhance the user experience.

Adds a retry download button for failed downloads.  Displays download progress with a progress bar and file size information. Improves the overall layout and styling for better clarity.

* feat: displays video download manager as popover

Moves the video download manager to a popover that is displayed when hovering over the download button in the video component.

Adds no-data message to download manager when the queue is empty.

Updates styling for the download manager and progress bar.

* Styles video download manager items

Increases spacing between video download manager items and changes the filename text from h4 to h6 for better visual hierarchy.

* perf: preloads video metadata

Adds `preload="metadata"` attribute to the video element. This optimizes video loading by preloading metadata such as duration and dimensions before the user initiates playback.  This improves the user experience by allowing the player to display information like duration and prepare for playback more quickly.

* feat: improves video UI with placeholders and layout

Adds placeholder skeletons for video list and individual video components to improve user experience during loading.

Removes unnecessary conditional rendering of video list and video player, simplifying the component logic.

Adjusts video title styling for better visual presentation.

Adds `w-100` class to video component on the detail page for responsive layout.

Removes unnecessary conditional check for video URL in video item component.

* fix: video reload on route change

Reloads the video player when the route changes to a new video.

This change addresses an issue where the video player would not reload when navigating between different videos. The `videoPlayer` component now has a public `player` property that exposes the underlying HTMLVideoElement.  The `VideoComponent` now uses `@ViewChild` to access the `videoPlayer` and calls its `load` method when the `video$` observable emits a new value. This ensures that the video player correctly reloads and plays the new video when the route changes.

* enhance: shows toastr notifications for download status changes

Implements toastr notifications to inform the user about the status of their downloads, including start, completion, and failure.

This improvement enhances the user experience by providing real-time feedback during the download process.

* enhance: improves download filename handling

Uses a new utility function to extract filenames from URLs for downloads,
providing a default filename if extraction fails. This improves the
handling of filenames in download notifications and the saved files.

* feat: improves video list loading and display

Implements infinite scrolling for video lists on both the main video page and the video detail page.

This enhances the user experience by loading videos on demand as the user scrolls down, preventing initial page load times from being excessively long when dealing with many videos.  It also adds a new action and effect to fetch videos while excluding a specific video ID, which is used on the video detail page to avoid displaying the currently viewed video in the related videos list.  Additionally, the related videos list on the video details page now utilizes the infinite scroll functionality for loading more videos.

* refactor: video components and improves UX

- Extracts filename from URL using a utility function for consistency.
- Improves dialog handling by ensuring single emissions on close.
- Improves UX by resetting scroll position and skip value on navigation within video details.
- Uses untilDestroyed operator to prevent memory leaks in subscriptions.

* fix: removes unused video-preview component and related files.

Moves download-related services and components into the video-ui module for better organization.  Updates imports accordingly.

* feat: adds video page filters

Adds support for saving filter state.
Removes employee filter from video page selectors.
Updates video page to use new filter structure.

* feat: improves video UI with loading and error states

Adds loading and error states to the video player and video list components.

Includes a skeleton loader for initial loading and a loading indicator during video retrieval.  Displays user-friendly messages for video not found errors.  Also improves styling with rounded corners for skeleton loaders.

* feat: improves video list loading state

Adds a loading indicator to the video list page while videos are being fetched.

Displays a "No video found" message if no videos are available after loading.

Sets a minimum placeholder display time for a smoother user experience.

* feat: hides video tab if no videos are available

Introduces a check for video availability and dynamically adds/removes the "Videos" tab in the employee activity layout based on the presence of videos.

This prevents displaying an empty video tab when no videos exist, improving the user experience.

* fix: cspell spelling

* fix: cspell spelling

* fix: file saving error handling

Improves error handling and resource cleanup in the `FileSaveStrategy`.

Adds checks for valid blob and filename inputs.
Wraps file saving operations in a try-catch block to handle potential errors.
Ensures removal of the temporary link element and revocation of the blob URL in a finally block.

* fix: sanitizes video source URL

Uses `DomSanitizer` to bypass security and prevent XSS vulnerabilities when binding to the `src` attribute of the video player.  This ensures that untrusted URLs are handled safely.

* fix: adds rel="noopener noreferrer" to external link

Improves security by adding `rel="noopener noreferrer"` to the external link for viewing the full video. This prevents the linked site from accessing the original page's `window` object and mitigates potential security risks.

---------

Co-authored-by: adkif <akifungo@gmail.com>
Copy link
Contributor

coderabbitai bot commented Jan 24, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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>, please review it.
    • 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 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 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 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. (Beta)
  • @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.

@CLAassistant
Copy link

CLAassistant commented Jan 24, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
5 out of 6 committers have signed the CLA.

✅ samuelmbabhazi
✅ rahul-rocket
✅ GloireMutaliko21
✅ adkif
✅ evereq
❌ dependabot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

gitguardian bot commented Jan 24, 2025

⚠️ GitGuardian has uncovered 2 secrets 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 secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
15092885 Triggered Generic High Entropy Secret 5a9d23c packages/core/src/lib/tenant-api-key/tenant-api-key.service.ts View secret
15092886 Triggered Generic High Entropy Secret 46c62c2 packages/core/src/lib/tenant-api-key/tenant-api-key.service.ts 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 secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  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

nx-cloud bot commented Jan 24, 2025

View your CI Pipeline Execution ↗ for commit e8b67d5.

Command Status Duration Result
nx build gauzy -c=production --prod --verbose ✅ Succeeded 4m 5s View ↗
nx build api -c=production --prod ✅ Succeeded 1m 8s View ↗
nx build desktop-ui-lib --configuration=develop... ✅ Succeeded 30s View ↗
nx build desktop-ui-lib --configuration=production ✅ Succeeded 28s View ↗
nx build plugin-integration-wakatime ✅ Succeeded <1s View ↗
nx build desktop-lib ✅ Succeeded <1s View ↗
nx build desktop-window ✅ Succeeded <1s View ↗
nx build desktop-core ✅ Succeeded <1s View ↗
Additional runs (52) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-01-25 08:05:21 UTC

Copy link

socket-security bot commented Jan 25, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@akveo/ng2-completer@9.0.1 None 0 902 kB akveo
npm/@ali-hm/angular-tree-component@18.0.5 None 0 666 kB ali-hm
npm/@asymmetrik/ngx-leaflet@18.0.1 None 0 266 kB rblace
npm/@cloudinary/ng@2.1.1 None +5 3.82 MB cloudinary
npm/@cloudinary/url-gen@1.21.0 environment, network +1 4.56 MB cloudinary
npm/@datorama/akita@8.0.1 🔁 npm/@datorama/akita@7.1.1 None +1 396 kB netbasal
npm/@faker-js/faker@9.4.0 🔁 npm/@faker-js/faker@8.0.0-alpha.0 None 0 8.54 MB division-by-zero, shinigami92, st-ddt
npm/@fortawesome/fontawesome-free@6.7.2 None 0 18.5 MB devoto13, fortawesome-admin, jasonlundien, ...4 more
npm/@fortawesome/free-brands-svg-icons@6.7.2 None 0 2.19 MB devoto13, fortawesome-admin, jasonlundien, ...4 more
npm/@fortawesome/free-regular-svg-icons@6.7.2 None 0 693 kB devoto13, fortawesome-admin, jasonlundien, ...4 more
npm/@fortawesome/free-solid-svg-icons@6.7.2 None 0 5.17 MB devoto13, fortawesome-admin, jasonlundien, ...4 more
npm/@fullcalendar/bootstrap@6.1.15 None 0 11.1 kB arshaw
npm/@fullcalendar/core@6.1.15 network 0 1.86 MB arshaw
npm/@fullcalendar/daygrid@6.1.15 None 0 202 kB arshaw
npm/@fullcalendar/interaction@6.1.15 None 0 329 kB arshaw
npm/@fullcalendar/moment-timezone@6.1.15 None 0 6.72 kB arshaw
npm/@fullcalendar/timegrid@6.1.15 None 0 237 kB arshaw
npm/@jitsu/js@1.9.12 network +10 5.32 MB jitsuhq
npm/@kurkle/color@0.3.4 None 0 79 kB kurkle
npm/@mikro-orm/nestjs@6.0.2 🔁 npm/@mikro-orm/nestjs@5.2.3 None 0 56.4 kB b4nan
npm/@ng-maps/core@7.0.0 None 0 664 kB dasch
npm/@ng-maps/google@7.0.0 None 0 289 kB dasch
npm/@swimlane/ngx-charts@20.5.0 None +24 8.25 MB marjan-georgiev
npm/@types/async@3.2.24 None 0 30.6 kB types
npm/@types/chart.js@2.9.41 None 0 43.3 kB types
npm/@types/ckeditor@4.9.10 None 0 114 kB types
npm/@types/d3-color@3.1.3 None 0 27.9 kB types
npm/@types/file-saver@2.0.7 None 0 6.31 kB types
npm/@types/google.analytics@0.0.41 None 0 24.4 kB types
npm/@types/hammerjs@2.0.46 None 0 11.9 kB types
npm/@types/html-to-text@9.0.4 None 0 20.6 kB types
npm/@types/i18n@0.12.0 None 0 19.3 kB types
npm/@types/leaflet@1.9.16 None +1 122 kB types
npm/@types/underscore.string@0.0.38 None 0 20.8 kB types
npm/@types/underscore@1.13.0 None 0 258 kB types
npm/@types/uuid@8.3.4 None 0 6.67 kB types
npm/bootstrap@4.6.2 None +1 5.81 MB xhmikosr
npm/brace@0.11.1 None 0 8.46 MB thlorenz
npm/chart.js@4.4.7 None 0 4.94 MB chartjs-ci
npm/chart.piecelabel.js@0.15.0 None +5 1.56 MB emn178
npm/chartjs-plugin-annotation@3.1.0 None 0 244 kB chartjs-ci
npm/ckeditor4-angular@4.0.1 None +1 304 kB ckeditor
npm/ckeditor4@4.22.1 None 0 6.74 MB ckeditor
npm/d3-selection-multi@1.0.1 None +7 458 kB mbostock
npm/d3@7.9.0 Transitive: filesystem, network, shell +35 3.6 MB mbostock
npm/date-holidays@1.9.1 None +6 16.6 MB commenthol
npm/echarts@5.6.0 None +1 53.2 MB 100pah, apache-echarts, errorrik, ...6 more
npm/eva-icons@1.1.3 None 0 8.29 MB akveo
npm/fast-json-stringify@2.7.13 eval 0 347 kB matteo.collina
npm/file-saver@2.0.5 None 0 36 kB endless
npm/filepond-plugin-file-encode@2.1.14 None 0 20 kB pqina
npm/filepond-plugin-file-validate-size@2.2.8 None 0 21.4 kB pqina
npm/filepond-plugin-file-validate-type@1.2.9 None 0 24.9 kB pqina
npm/filepond-plugin-image-crop@2.0.6 None 0 16.4 kB pqina
npm/filepond-plugin-image-exif-orientation@1.0.11 None 0 17.4 kB pqina
npm/filepond-plugin-image-preview@4.6.12 None 0 217 kB pqina
npm/filepond-plugin-image-resize@2.0.10 None 0 18.2 kB pqina
npm/filepond-plugin-image-transform@3.8.7 None 0 255 kB pqina
npm/filepond@4.32.7 network 0 1.18 MB pqina
npm/formidable@3.5.2 None +3 247 kB grossacasacs
npm/fullcalendar@6.1.15 None +2 1.1 MB arshaw
npm/hotkeys-js@3.13.9 environment 0 98.1 kB wcjiang
npm/html-to-text@9.0.5 None +1 186 kB killy.mxi
npm/html2canvas@1.4.1 None +1 3.93 MB niklasvh
npm/immer@9.0.21 environment 0 872 kB mweststrate
npm/ionicons@4.6.3 eval, network 0 2.75 MB adamdbradley
npm/mysql2@3.12.0 Transitive: eval +10 1.35 MB iarna, sidorares, sushantdhiman

🚮 Removed packages: npm/@ngx-translate/core@16.0.4, npm/@ngx-translate/http-loader@16.0.1, npm/mysql@2.18.1, npm/pm2@5.4.3

View full report↗︎

Copy link

socket-security bot commented Jan 25, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

rahul-rocket and others added 4 commits January 25, 2025 12:01
…o-player.component.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@evereq evereq merged commit 29ae1bb into stage Jan 25, 2025
20 of 23 checks passed
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.

7 participants