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] Create Reusable Component and Add Workspace Links #8383

Merged
merged 6 commits into from
Oct 10, 2024

Conversation

adkif
Copy link
Contributor

@adkif adkif commented Oct 10, 2024

PR

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


Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new patterns constant for input validation.
    • Added components for logo display (<gauzy-logo>) and theme switching (<gauzy-switch-theme>).
    • Implemented a new section for social sign-in links and a "Sign In Workspace" area.
  • Improvements

    • Enhanced the login form layout and responsiveness for mobile users.
    • Updated the login component to streamline imports and improve performance.
  • Bug Fixes

    • Removed unused imports and methods, optimizing the login functionality.
  • Styling

    • New styles added for logo and social links components to improve visual presentation.

@adkif adkif requested review from evereq and rahul-rocket October 10, 2024 19:16
Copy link
Contributor

coderabbitai bot commented Oct 10, 2024

Walkthrough

The changes in this pull request involve modifications to the authentication module and login components of the desktop UI library. Key updates include the export of the socialLinks variable for external access, the introduction of a new patterns constant for input validation, and significant structural changes to the login component's HTML and SCSS files. New components for the logo and social links have been added, alongside styling adjustments to improve layout and responsiveness.

Changes

File Change Summary
auth/auth.module.ts Exported socialLinks constant for external access.
constants/app.constants.ts Added new constant patterns for input validation regex.
login/login.component.html Replaced logo with <gauzy-logo> and added <gauzy-switch-theme>, introduced "login magic" section, and updated social sign-in with <ngx-social-links>.
login/login.component.scss Adjusted styles for layout and responsiveness of the login component.
login/login.component.ts Removed unused imports and member variables, updated constructor, and removed logoUrl getter method.
login/login.module.ts Updated to include SwitchThemeModule and added LogoComponent and SocialLinksComponent to declarations.
login/shared/ui/logo/logo.component.html Introduced new HTML structure with svg-wrapper for the logo component.
login/shared/ui/logo/logo.component.scss Added new CSS classes .svg-wrapper and .ever-logo-svg for the logo component.
login/shared/ui/logo/logo.component.ts Created new LogoComponent with a public getter for logoUrl.
login/shared/ui/social-links/social-links.component.html Introduced new template for rendering social sign-in links based on socialLinks$ observable.
login/shared/ui/social-links/social-links.component.scss Created new SCSS file defining styles for the social links component.
login/shared/ui/social-links/social-links.component.ts Created new SocialLinksComponent with ISocialLink interface and ngOnInit method.

Possibly related PRs

Suggested reviewers

  • evereq
  • rahul-rocket

Poem

In the realm of login, changes abound,
With links to the social, new paths are found.
A logo that sparkles, a theme switch in sight,
With patterns for safety, we code through the night.
Hops of delight as we log in with glee,
A bright future awaits, come login with me! 🐇✨


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

🧹 Outside diff range and nitpick comments (13)
packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.scss (2)

3-5: Consider using a variable for the margin value

The top margin of 21px seems specific. Consider using a SCSS variable for this value to improve maintainability and consistency across the application.

+$social-links-top-margin: 21px;

.links {
-  margin-top: 21px;
+  margin-top: $social-links-top-margin;
  @include social-links-style;

This change would make it easier to adjust the spacing consistently if needed in the future.


6-9: Good use of nesting, consider using variables for margins

The nesting of .socials within .links is a good use of SCSS features. However, consider using variables for the margin values to improve maintainability:

+$socials-top-margin: 15px;
+$socials-bottom-margin: 25px;

.links {
  // ...
  & .socials {
-    margin-top: 15px;
-    margin-bottom: 25px;
+    margin-top: $socials-top-margin;
+    margin-bottom: $socials-bottom-margin;
  }
}

This change would make it easier to adjust the spacing consistently if needed in the future.

packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.ts (2)

10-15: LGTM: Class definition and constructor are well-structured.

The component class is correctly defined, and dependency injection is properly used. However, consider improving type safety:

Consider creating a specific interface for the environment configuration instead of using any:

interface GauzyEnvironment {
  PLATFORM_LOGO: string;
  // Add other environment properties as needed
}

constructor(
  private readonly _domSanitizer: DomSanitizer,
  @Inject(GAUZY_ENV)
  private readonly _environment: GauzyEnvironment
) {}

This will provide better type checking and autocompletion for environment properties.


17-19: LGTM: Getter method correctly handles URL sanitization.

The logoUrl getter appropriately uses DomSanitizer to handle the logo URL safely. However, consider adding error handling:

Add a check for the existence of PLATFORM_LOGO in the environment object:

public get logoUrl(): SafeResourceUrl {
  if (!this._environment.PLATFORM_LOGO) {
    console.warn('PLATFORM_LOGO is not defined in the environment');
    return this._domSanitizer.bypassSecurityTrustResourceUrl('');
  }
  return this._domSanitizer.bypassSecurityTrustResourceUrl(this._environment.PLATFORM_LOGO);
}

This will prevent potential runtime errors if the logo URL is not defined in the environment.

packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.html (1)

3-5: LGTM: Good accessibility and internationalization practices.

The use of aria-label for the social links container and the translation pipe for the text improves accessibility and internationalization. The structure is appropriate for grouping social links.

Consider adding a heading element (e.g., <h2>) for the "Social SignIn" text to improve the semantic structure of the document. This can further enhance accessibility and SEO. For example:

<div class="links">
  <h2 aria-label="Social SignIn">{{ 'LOGIN_PAGE.OR_SIGN_IN_WITH' | translate }}</h2>
  <div class="socials">
    <!-- ... -->
  </div>
</div>
packages/desktop-ui-lib/src/lib/login/login.module.ts (1)

Line range hint 1-41: Consider organizing imports for better readability

While the current import structure is functional, consider grouping related imports together for improved readability and maintainability. Here's a suggested organization:

  1. Angular core imports
  2. Angular module imports
  3. Nebular imports
  4. Local module imports
  5. Component imports

This organization can make it easier to manage imports as the module grows.

Here's an example of how you could reorganize the imports:

// Angular core imports
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

// Nebular imports
import { NbAuthModule } from '@nebular/auth';
import {
  NbAlertModule,
  NbButtonModule,
  NbCardModule,
  NbCheckboxModule,
  NbFormFieldModule,
  NbIconModule,
  NbInputModule
} from '@nebular/theme';

// Local module imports
import { DesktopDirectiveModule } from '../directives/desktop-directive.module';
import { LanguageModule } from '../language/language.module';
import { SwitchThemeModule } from '../theme-selector/switch-theme/switch-theme.module';

// Component imports
import { NgxLoginComponent } from './login.component';
import { LogoComponent } from './shared/ui/logo/logo.component';
import { SocialLinksComponent } from './shared/ui/social-links/social-links.component';
packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.ts (2)

1-4: LGTM with a suggestion for improvement

The imports look good and cover all necessary dependencies for the component's functionality. The use of UntilDestroy is a good practice for managing subscriptions.

However, consider moving the socialLinks constant to a separate shared module to avoid potential circular dependencies between the auth and login modules.


28-39: LGTM with a minor documentation improvement

The SocialLinksComponent class is well-structured and follows Angular best practices. The use of an Observable for socialLinks$ allows for reactive programming, which is a good approach.

However, the JSDoc comment for the ngOnInit method is incomplete. Consider adding a brief description of what the method does.

Suggestion for improving the JSDoc comment:

/**
 * Initializes the component by setting up the socialLinks$ Observable.
 * This method is called once the component is initialized.
 */
ngOnInit(): void {
  this.socialLinks$ = of(socialLinks);
}
packages/desktop-ui-lib/src/lib/login/login.component.ts (1)

Line range hint 1-41: Summary of changes and potential impact

The modifications to NgxLoginComponent primarily involve:

  1. Simplification of the constructor by removing DomSanitizer and GAUZY_ENV dependencies.
  2. Removal of the logoUrl getter method.

These changes suggest a shift in how environment-specific configurations and URL sanitization are handled. While the core login functionality appears to be preserved, it's important to:

  1. Verify that the removed functionality is appropriately managed elsewhere in the application if still needed.
  2. Ensure that any components or templates that previously relied on the logoUrl getter have been updated accordingly.
  3. Review the application's error handling and security measures, particularly regarding URL sanitization, given the removal of DomSanitizer.

Consider documenting these architectural changes, especially regarding how environment-specific configurations and URL sanitization are now handled, to maintain clear communication within the development team and ease future maintenance.

packages/desktop-ui-lib/src/lib/auth/auth.module.ts (1)

15-15: Approved: Exporting socialLinks enhances reusability, but consider long-term implications.

The change to export the socialLinks constant is straightforward and can improve code reuse. This modification allows other parts of the application to access and utilize the same social authentication configuration, promoting consistency.

However, keep in mind:

  1. This increases the public API surface of the auth module.
  2. It may lead to tighter coupling if many components start depending on this exported constant.

In the future, consider:

  • Documenting the intended usage of this exported constant.
  • Monitoring its usage to prevent over-reliance across the application.
  • Evaluating if a more robust solution (e.g., a service) might be needed if the configuration becomes more complex or dynamic.
packages/desktop-ui-lib/src/lib/login/login.component.scss (2)

329-330: Good use of relative units, consider small horizontal padding

The change to use rem units for vertical padding is good for responsiveness. However, completely removing the horizontal padding might cause content to touch the screen edges on very small devices.

Consider adding a small horizontal padding, e.g.:

- padding: 1rem 0;
+ padding: 1rem 0.5rem;

This will maintain some breathing space on the sides while still allowing for a more compact mobile layout.


Line range hint 391-394: Good centering technique, consider flexible vertical positioning

The horizontal centering using left: 50% and transform: translate(-50%) is a solid approach. The z-index: 6 ensures the element remains visible above other content.

Consider using a more flexible approach for vertical positioning:

 .demo-credentials-select {
-  top: 83px;
+  top: 10vh; /* Or use a percentage of the parent's height */
   left: 50%;
   transform: translate(-50%);
   z-index: 6;
 }

This change will make the vertical positioning more adaptable to different screen sizes while maintaining the intended layout.

packages/desktop-ui-lib/src/lib/login/login.component.html (1)

130-132: Consider adding aria-label to the login magic link for accessibility

Adding an aria-label to the <a> tag improves accessibility for screen readers.

Apply this diff to include the aria-label:

<a routerLink="/auth/login-magic"
+   aria-label="{{ 'LOGIN_PAGE.LOGIN_MAGIC.TITLE' | translate }}">
    {{ 'LOGIN_PAGE.LOGIN_MAGIC.TITLE' | translate }}
</a>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4cb550b and aff5409.

📒 Files selected for processing (12)
  • packages/desktop-ui-lib/src/lib/auth/auth.module.ts (1 hunks)
  • packages/desktop-ui-lib/src/lib/constants/app.constants.ts (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/login.component.html (2 hunks)
  • packages/desktop-ui-lib/src/lib/login/login.component.scss (2 hunks)
  • packages/desktop-ui-lib/src/lib/login/login.component.ts (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/login.module.ts (2 hunks)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.html (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.scss (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.ts (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.html (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.scss (1 hunks)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.html
  • packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.scss
🧰 Additional context used
🔇 Additional comments (18)
packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.scss (3)

1-1: LGTM: Good use of shared styles

Importing styles from a shared reusable stylesheet is a good practice. It promotes consistency across components and reduces code duplication.


1-10: Overall: Well-structured SCSS with minor improvement suggestions

This SCSS file for the social links component is well-organized and makes good use of SCSS features like nesting and mixins. It promotes code reuse by importing shared styles and using a mixin for common social link styles. The suggestions provided are minor and aimed at improving maintainability through the use of variables for specific values. Overall, the file adheres to good SCSS practices and provides a solid foundation for styling the social links component.


5-5: LGTM: Good use of mixin, verify implementation

The use of the social-links-style mixin is a good practice for reusing styles. However, ensure that the mixin is properly implemented in the shared stylesheet.

To verify the mixin implementation, you can run the following command:

This will help ensure that the mixin is correctly defined and contains the expected styles.

packages/desktop-ui-lib/src/lib/login/shared/ui/logo/logo.component.ts (2)

1-3: LGTM: Imports are appropriate and well-structured.

The imports cover all necessary Angular modules and local constants required for the component's functionality.


5-9: LGTM: Component decorator follows Angular best practices.

The component is well-defined with a clear selector and separate files for template and styles, which promotes better organization and maintainability.

packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.html (1)

1-2: LGTM: Proper use of async pipe and conditional rendering.

The use of the async pipe with socialLinks$ and the subsequent check for non-empty socialLinks is a good practice. It ensures that the component only renders when data is available, preventing unnecessary DOM elements when there are no social links.

packages/desktop-ui-lib/src/lib/login/login.module.ts (3)

17-17: LGTM: SwitchThemeModule import added

The addition of the SwitchThemeModule import suggests the introduction of theme-switching functionality to the login module. This is a good enhancement for user experience.


19-20: LGTM: New component imports added

The imports for LogoComponent and SocialLinksComponent indicate a good separation of concerns, likely extracting these elements from the main login component for better modularity and reusability.


36-37: LGTM: Module configuration updated correctly

The changes to the @NgModule decorator are correct:

  1. SwitchThemeModule is properly added to the imports array.
  2. LogoComponent and SocialLinksComponent are correctly added to the declarations array.
  3. The use of LanguageModule.forChild() is a good practice for feature modules in Angular.

These updates ensure that the new components and functionality are properly integrated into the module.

Also applies to: 39-39

packages/desktop-ui-lib/src/lib/login/shared/ui/social-links/social-links.component.ts (2)

6-20: Well-structured and documented interface

The ISocialLink interface is well-defined with clear property types and good use of optional properties. The JSDoc comments for each property enhance code readability and maintainability.


22-27: LGTM: Proper use of decorators and component metadata

The @UntilDestroy({ checkProperties: true }) decorator is correctly applied, which will help prevent memory leaks by automatically unsubscribing from observables. The @Component decorator is properly configured with the correct selector, template, and styles.

packages/desktop-ui-lib/src/lib/login/login.component.ts (2)

Line range hint 1-41: Consider adding method comments and review remaining functionality

The core structure of the NgxLoginComponent remains largely unchanged. However, given the removal of some functionality, it would be beneficial to:

  1. Add comments to explain the purpose of each method, especially ngOnInit, forgot, and register.
  2. Review if the showPassword property is still being used as intended.
  3. Ensure that the removal of the logoUrl getter doesn't affect the component's template or any other parts of the application that might have depended on it.

Consider adding method comments like this:

/**
 * Initializes the component.
 * Sets up language services for the electron app.
 */
ngOnInit() {
  this.languageElectronService.initialize<void>();
}

/**
 * Opens the forgot password page in the default browser.
 */
public forgot(): void {
  this.electronService.shell.openExternal('https://app.gauzy.co/#/auth/request-password');
}

/**
 * Opens the registration page in the default browser.
 */
public register(): void {
  this.electronService.shell.openExternal('https://app.gauzy.co/#/auth/register');
}

To ensure the showPassword property is still in use, run the following script:

#!/bin/bash
# Description: Check for showPassword usage in the component's template

echo "Checking for showPassword usage in the template:"
rg --type html 'showPassword' packages/desktop-ui-lib/src/lib/login/login.component.html

24-27: Verify the impact of removed constructor parameters

The constructor has been simplified by removing DomSanitizer and GAUZY_ENV parameters. This change suggests that functionality related to URL sanitization and environment-specific configurations has been removed or relocated.

Please ensure that:

  1. The removed functionality (if still needed) is properly handled elsewhere in the application.
  2. There are no remaining references to this._domSanitizer or this._environment within the component.
  3. The logo handling (previously done via the removed logoUrl getter) is appropriately managed in the new implementation.

Run the following script to verify there are no lingering references:

✅ Verification successful

Constructor parameters have been successfully simplified

The constructor in login.component.ts no longer references _domSanitizer or _environment. Verified that there are no lingering references within the component.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to removed dependencies

# Test 1: Search for _domSanitizer usage
echo "Checking for _domSanitizer usage:"
rg --type typescript '_domSanitizer' packages/desktop-ui-lib/src/lib/login

# Test 2: Search for _environment usage
echo "Checking for _environment usage:"
rg --type typescript '_environment' packages/desktop-ui-lib/src/lib/login

# Test 3: Search for logoUrl references
echo "Checking for logoUrl references:"
rg --type typescript 'logoUrl' packages/desktop-ui-lib/src/lib/login

Length of output: 988


Script:

#!/bin/bash
# Description: Check for any remaining references to removed dependencies

# Test 1: Search for _domSanitizer usage
echo "Checking for _domSanitizer usage:"
rg --type ts '_domSanitizer' packages/desktop-ui-lib/src/lib/login

# Test 2: Search for _environment usage
echo "Checking for _environment usage:"
rg --type ts '_environment' packages/desktop-ui-lib/src/lib/login

# Test 3: Search for logoUrl references
echo "Checking for logoUrl references:"
rg --type ts 'logoUrl' packages/desktop-ui-lib/src/lib/login

Length of output: 1087

packages/desktop-ui-lib/src/lib/login/login.component.scss (2)

30-30: LGTM: Improved responsiveness for SVG wrapper

Setting the width to 100% for the .svg-wrapper class is a good practice for responsive design. This change ensures that the SVG content adjusts properly to different screen sizes.


Line range hint 1-478: Overall: Improved responsiveness and mobile layout

The changes in this file significantly enhance the login component's responsiveness and mobile layout. Key improvements include:

  1. Better use of relative units (rem) for padding.
  2. Improved centering techniques for mobile elements.
  3. Adjustments to element widths and positioning for better adaptability.

These modifications will result in a more consistent and user-friendly experience across various device sizes. The suggestions provided in the review comments can further refine the responsive behavior.

packages/desktop-ui-lib/src/lib/login/login.component.html (3)

4-5: Components <gauzy-logo> and <gauzy-switch-theme> are properly integrated

The inclusion of <gauzy-logo> and <gauzy-switch-theme> components enhances modularity and allows for reusability across the application.


136-136: Component <ngx-social-links> is correctly utilized

Replacing the social links section with <ngx-social-links> component streamlines the code and promotes reusability.


138-143: New workspace sign-in section is well implemented

The addition of the workspace sign-in section enhances user navigation and aligns with the application's functionality.

Copy link

nx-cloud bot commented Oct 10, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit aff5409. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx build gauzy -c=production --prod --verbose
nx build desktop-ui --prod --base-href ./
✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@@ -42,8 +37,4 @@ export class NgxLoginComponent extends NbLoginComponent implements OnInit {
public register(): void {
this.electronService.shell.openExternal('https://app.gauzy.co/#/auth/register');
Copy link
Member

Choose a reason for hiding this comment

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

@adkif we should have this URL read from env var, we can't hardcode it, please fix in next PR :) (needed for customizations)

@evereq evereq merged commit afb5d20 into develop Oct 10, 2024
18 of 20 checks passed
@evereq evereq deleted the feat/add-link-workspace-magic-signin branch October 10, 2024 20:38
@@ -17,3 +17,11 @@ export const injector = Injector.create({
export const API_ACTIVITY_WATCH_PREFIX = '/buckets';

export const AUTO_REFRESH_DELAY = 60 * 10 * 1000; // milliseconds

export const patterns = {
websiteUrl: /^((?:https?:\/\/)[^./]+(?:\.[^./]+)+(?:\/.*)?)$/,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@adkif We already have such patterns in @gauzy/ui-core package. Why we are duplicating many things?

@coderabbitai coderabbitai bot mentioned this pull request Oct 11, 2024
2 tasks
samuelmbabhazi pushed a commit that referenced this pull request Oct 11, 2024
* feat: export social links

* feat: create a shared logo component

* feat: create a shared social links component

* feat: add reusable patterns to constants

* feat: add link to magic workspace signin and use reusable logo, links and switch

* feat: SwitchThemeModule, LogoComponent, and SocialLinksComponent to NgxLoginModule
evereq added a commit that referenced this pull request Oct 13, 2024
* fix: #8339 employee & organization parameters to URLs

* fix: #8339 project parameters to URLs

* fix: #8339 date range picker parameters to URLs

* fix: #8339 project parameters to URLs

* fix: don't merge new config with old default config

* fix: don't merge new config with old default config

* fix: organization controller and module improvement

* feat: add standardWorkHoursPerDay column to organization entity

* feat: #8341 add standardWorkHoursPerDay column migration to organization entity

* feat: #8341 add standardWorkHoursPerDay column migration to organization table

* feat: #8341 add standardWorkHoursPerDay column migration to tenant table

* fix: create/update standard work hours per day

* feat: get task by view query model

* feat: get task by view query DTO

* feat: get tasks by view filter API

* fix: save standard work hours per day for organization

* fix: get tasks by view filters

* fix: remove unused DTO

* chore(deps): add chartjs-plugin-annotation

chore: add chartjs-plugin-annotation package for annotation support in charts

* fix: organization ID filter in query

* feat: add translations for Standard Work Hours

* feat: #8341 added horizontal dotted line

* fix(deepscan): removed unused import

* fix(coderrabitai): improve types and finders

* fix: sprint DELETE role permission

* fix: improve sprints role permissions

* fix: #8340 clear data before loading on report pages

* fix: issue type value using enum

* fix(deepscan): removed unused import

* feat: #8339 bookmark query params builder resolver

* [Feat] Add new workspace's methods to desktop authentication service (#8375)

* feat: add new methods to service

* feat: remove unecessary try-catch blocks and type annotations for return values in AuthService methods.

* [Feat] Create Reusable Component and Add Workspace Links (#8383)

* feat: export social links

* feat: create a shared logo component

* feat: create a shared social links component

* feat: add reusable patterns to constants

* feat: add link to magic workspace signin and use reusable logo, links and switch

* feat: SwitchThemeModule, LogoComponent, and SocialLinksComponent to NgxLoginModule

* fix(cspell): typo spelling :-)

* fix: improvement suggested by CodeRabbit

* fix: improvement suggested by CodeRabbit

* fix: improvement suggested by CodeRabbit

* fix: task type enum swagger

* fix: issue type enum

* feat: #8386 add module and entity for global logging of API

* feat: #8386 add repository and subscriber for global logging of API

* feat: #8386 table migration for "api_call_log" table

* fix: #8386 circular dependency injection in repository

* [Fix] Edit team functionality not working

* feat: #8386 retrieves call logs API

* fix(deepscan): property is accessed without null check

* fix: missing role-permission module

* fix: better encapsulation and reducing coupling between modules

* fix: task view not found update command handler

* [Fix] Filters not working

* fix: #8386 added origin into `api_call_log`  table

* [Feat] Implement magic login (#8387)

* feat: create reusable workspace selection component

* feat: create debounce click directive

* feat: create reusable avatar component

* feat: implement login magic component

* feat: implement login magic workspace component

* feat: implement login workspace component

* feat: reuse shared core styles

* feat: add new component to login

* feat: create authentication routes

* feat: use lazy loading for authentications routes

* fix: add code rabbit suggestions

* fix: apply code rabbit suggestions

* fix: apply code rabbit suggestions

* [Fix] Task deselect on refresh (#8392)

* fix: task deselect on refresh

* fix: add `organizationTeamId` missing property to time tracker API request and spread `arg.timer` into the request object.

* fix: apply code rabbit suggestion

* [Fix] Edit contact for (client,customers,leads) functionality not working  (#8393)

* [Fix] Edit contact for (client,customers,leads) functionality not working

* Remove member deletion

* [Fix] Remote timer logic stop calls (#8394)

* fix: remote timer logic and stopTimer calls

* refactor: remote timer logic

* [Feat] Resource Link Entity (#8397)

* feat: add resource link model and entity

* feat: resource link migration

* [Feat] Resource Link API (#8399)

* feat: add resource link model and entity

* feat: resource link migration

* feat: add resource link service

* feat: resource link commands

* feat: add resource link handlers

* feat: add resource link subscriber

* feat: add resource link controller and DTO

* chore: desktop builds on Windows

---------

Co-authored-by: Rahul R. <rahulrathore576@gmail.com>
Co-authored-by: GloireMutaliko21 <mufunyig@gmail.com>
Co-authored-by: Kifungo A <45813955+adkif@users.noreply.github.com>
Co-authored-by: samuelmbabhazi <samuelmbabhazi@gmail.com>
Co-authored-by: samuel mbabhazi <111171386+samuelmbabhazi@users.noreply.github.com>
Co-authored-by: Gloire Mutaliko (Salva) <86450367+GloireMutaliko21@users.noreply.github.com>
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.

3 participants