Commit Graph

31 Commits

Author SHA1 Message Date
Giancarlo Buomprisco
fc2fda595a Snyk report fixes + offcanvas sidebar fix (#263)
Refactor:
- Improved consistency and robustness by standardizing file encoding arguments from 'utf-8' to 'utf8' across various file read/write operations.
- Simplified status mapping logic in billing components and services by replacing switch statements with direct mapping objects for clearer and more maintainable code.
- Enhanced type conversion and error handling in billing and internationalization components for improved reliability.
- Updated sorting logic in team member tables for more predictable member ordering.
- Improved error logging with sanitized output to prevent formatting issues.
- Adjusted environment variable whitelisting to use a more flexible matching pattern.
- Fix variables for sidebar style handling

Style:
- Refined spacing and layout in account selector and sidebar header components for better visual consistency.
2025-06-01 20:10:39 +08:00
Giancarlo Buomprisco
c193f9fcb9 Update image uploader styling with object-contain and border (#173)
* Update image uploader styling with object-contain and border
* Fix avatar aspect ratio
2025-02-20 08:35:16 +08:00
Giancarlo Buomprisco
4e91f267e0 Tailwind CSS 4 Migration (#100)
* Updated to TailwindCSS v4
* Moved CSS module to its own CSS file because of lightingcss strict validation
* Respect next parameter in middleware
* Updated all packages. 
* Split CSSs for better organization.
* Redesigned theme and auth pages
* Improved pill and header design
* Formatted files using Prettier
* Better footer layout
* Better auth layout
* Bump version of the repository to 2.0.0
2025-01-28 14:19:52 +08:00
gbuomprisco
3fad846821 Run Prettier's automated formatting over the codebase. 2024-11-08 14:35:30 +08:00
Giancarlo Buomprisco
14c2220904 Update Shadcn Sidebar (#73)
Migrated Sidebar to use Shadcn UI's
2024-10-25 15:43:34 +08:00
Giancarlo Buomprisco
5b9285a575 Next.js 15 Update (#26)
* Update Next.js and React versions in all packages
* Replace onRedirect function with next/link in BillingSessionStatus, since it's no longer cached by default
* Remove unused revalidatePath import in billing return page, since it's no longer cached by default
* Add Turbopack module aliases to improve development server speed
* Converted new Dynamic APIs to be Promise-based
* Adjust mobile layout
* Use ENABLE_REACT_COMPILER to enable the React Compiler in Next.js 15
* Report Errors using the new onRequestError hook
2024-10-22 14:39:21 +08:00
Giancarlo Buomprisco
b2c27eb25b Sidebar: make it possible to set the sidebar as collapsed (#72)
* Sidebar: make it possible to set the sidebar as collapsed
2024-10-14 17:31:18 +08:00
gbuomprisco
0c415be8ee Refactor account-selector to use useMemo instead of useEffect
Replaced useEffect with useMemo for computing the account value. This simplifies the state management and ensures that the value is memoized based on the selectedAccount prop.
2024-08-30 17:05:57 +02:00
gbuomprisco
babdecb78f Refactor code and update dependencies
Rearranged imports for better organization and readability across multiple files. Updated the `react-i18next` dependency to version 15.0.1 in various `package.json` files. Adjusted formatting in multiple TypeScript files to ensure code style consistency.
2024-08-11 12:04:49 +02:00
Giancarlo Buomprisco
e696f1aed0 Design Updates: Breadcrumbs, Empty State, new Charts and new colors
Design Updates: Breadcrumbs, Empty State, new Charts and new colors

* Add Breadcrumb component to UI package

* Add AppBreadcrumbs for improved navigation: Replaced static text descriptions with the new AppBreadcrumbs component across multiple pages to enhance navigation. Addressed an issue with Supabase client warnings by temporarily suppressing getSession warnings. Also made minor UI adjustments, including adjustments to heading styles and layout features.

* Enhance UI styling and configuration settings: Updated various UI components and global styles to improve styling consistency and responsiveness.

* Update global styles and adjust padding: Updated several CSS variables for improved color accuracy and appearance. Added padding to admin account page body for better layout consistency.

* Refactor UI components and adjust styling: Replaced Heading tags in Plan Picker with span for consistency. Added active and hover states to buttons in the sidebar. Refined background, layout styling, and color schemes across various components. Removed sidebar case in Page component switch statement.

* Add Chart Components and Integrate into Dashboard: Introduced `recharts` library and created `Chart` components. Updated dashboard to use the new components and enhanced UI/UX with descriptions and restructured cards.
* Enhance dashboard demo UI layout: Refactor the layout by adjusting flex properties and spacing classes to improve component alignment. Update dummy data generation and Figure font size for better visual consistency.

* Update localization keys for navigation labels: Changed localization keys for tab labels to use 'routes' prefix for consistency. Adjusted corresponding component references and added missing keys for routes. This ensures better organization and uniformity in the code.

* Add EmptyState component and enhance account handling: Introduced a new EmptyState component for UI consistency and updated JSON locales with 'account' route. Modified HomeAddAccountButton to accept className prop and refactored HomeAccountsListEmptyState to use the new EmptyState component. Updated navigation config to align labels in locales.

* Add locale support and enhance currency formatting: This commit introduces locale-based currency formatting across billing components by utilizing the `useTranslation` hook to fetch the current language. It also refactors the `formatCurrency` function to accept an object parameter for better readability and reusability.

* Fix typo in devDependencies section of template generator: Corrected a syntax error in `package.json.hbs` template affecting the `@kit/tsconfig` entry. The change ensures that the dependency is properly defined and prevents potential issues during package management.

* Update heading levels and add tracking-tight class in auth shell: Changed Heading components from level 4 to level 5 and added the 'tracking-tight' class in multiple auth-related pages. This improves visual consistency and better aligns the typography across the application.
2024-08-04 23:25:28 +08:00
giancarlo
e88ae7268a Update UI styles and behavior across various components
This commit updates a variety of user interface styles and interactivity across multiple components. Changes include altering color schemes and border styles, modifying button interactivity and behaviors, and updating font weights. An emphasis has been placed on enhancing visual appearance, improving user experience, and maintaining a more consistent look-and-feel across the application.
2024-05-16 15:56:25 +07:00
giancarlo
39e0a229b6 Refactor account handling to improve performance
This commit dates the transition from a global user session to individual account handling based on user ID. The transition was made across several components, notably the account settings, icons, and selector. This change improves performance by reducing unnecessary requests and ensures more accurate data handling. The commit also includes some cleanups and minor fixes spread across different components.
2024-05-10 20:33:05 +07:00
giancarlo
b8f00f0a2d Refactor E2E tests, update utils, and modify plan-picker validation
Several changes have been made to optimize the testing and validation workflows. The end-to-end tests for user billing, invitations, account, team billing, and team accounts have been retouched for improved performance and better accuracy. There has been a minor modification in the validation rules for plan-picker in the billing component. Furthermore, modifications are made to several utility functions to fine-tune their operations.
2024-05-05 18:15:11 +07:00
giancarlo
05fd9fcb88 Add account selection functionality to mobile navigation
Added a new type, 'Accounts', and used it to enable account selection from the mobile navigation menu. The 'Accounts' type incorporates the label, value, and image of a given account. This change will improve the app's usability, making it easier for users to navigate different accounts directly from their mobile devices. For custom plans, a null check has been implemented to avoid rendering null values.
2024-05-02 01:30:51 +07:00
giancarlo
9baee90eec Update configuration settings and improve notifications
This commit updates the configuration settings and improves the notification functionality by filtering out duplicate notifications. It also includes changes to feature flag data types and removed dependencies in `package.json`, alongside updates to `pnpm-lock.yaml`.
2024-05-01 12:13:19 +07:00
Giancarlo Buomprisco
861b2130a7 New layout updates (#23)
* Remove redundant files and update pnpm lockfile

* Refactor and improve UI responsiveness

UI elements have been refactored for better responsiveness and a more consistent user interface. Changes include adjusting padding and margin in several components, altering sizes of variables like avatar and button, and repositioning notifications for better visibility. A more detailed breakdown can be found in the diffs.

* Updated UI components and page layout configurations

Enhanced UI components among different modules, adjusting their behavior and appearance. Also added logic to get layout style from cookies if available. This enables persistent interface configuration across sessions. Modified the PageStyle type renaming it as PageLayoutStyle and exported it, allowing use throughout the application.
2024-05-01 02:18:04 +07:00
Giancarlo Buomprisco
5e8e01e340 New Layout (#22)
New layout
2024-04-30 22:54:33 +07:00
giancarlo
cad729670f Update dependencies and import dynamic method
This commit updates multiple dependencies in the pnpm-lock.yaml file and imports the dynamic method from 'next/dynamic' in the site-header-account-section.tsx file. These updates are part of routine maintenance and improvement of the codebase. The import allows for dynamic imports, which can enhance performance.
2024-04-16 20:56:18 +08:00
giancarlo
8627cdaf1f Update 'next' package version and refactor user account handling
This commit updates the 'next' package from version 14.2.0 to 14.2.1 across various modules. It also refactors the code for user account handling to make it controlled by an enableTeamAccounts flag in the featureFlagsConfig, essentially allowing the enabling or disabling of the 'team accounts' feature according to the specified flag.
2024-04-15 17:46:11 +08:00
giancarlo
4e305bf8c9 Update UI, improve E2E tests and modify trial period configuration
The code changes incorporate UI updates for better usability and user experience. E2E test scripts(in `user-billing.spec.ts` and `team-billing.spec.ts`) were also updated for improved efficiency and accuracy, primarily replacing 'Active' status check with 'Trial'. Changes have been made in the trialDays configuration, with the term 'trialPeriod' now replaced by 'trialDays' across different components. Notably, a new error handling case is included in `lemon-squeezy-billing-strategy.service.ts` for failed subscription cancellation attempts.
2024-04-15 01:18:27 +08:00
giancarlo
fd890ea09d Update avatar styling and enhance workflow
Removed 'mr-2' from avatar styling in 'account-selector.tsx' and enhanced alignment within the group. Several environment variables were added in the GitHub workflow, improving the security and consistency of the test job. The names for 'typescript' and 'test' jobs are also standardized for better readability.
2024-04-14 12:39:50 +08:00
giancarlo
b6b9a9462f Add data testing attributes and adapt tests for team account invitations
This commit adds data testing attributes to key elements in the team account invitations features. It also modifies e2e tests to make use of these attributes. Additionally, it introduces minor tweaks to other parts of the system to better facilitate testing, such as adjustments in timeouts and update of some log messages.
2024-04-13 15:27:21 +08:00
giancarlo
2bad506d75 Update account management features and improve test configurations
Multiple updates are made to refine the account management features, including updating the 'Your Teams' text to show the number of teams, and modifying the form data validation process in the 'deletePersonalAccountAction' service. Additionally, improvements have been made in test configurations including updating the test timeout settings, taking screenshots when a test fails, and adjusting the location for saving Playwright reports.
2024-04-12 20:52:35 +08:00
giancarlo
477b8f0d52 Update Next.js version across dependencies
The Next.js version has been updated across multiple dependencies in the pnpm-lock file. This ensures consistency, removes instances of the canary version, and aligns all packages to use the stable 14.2.0 release.
2024-04-12 17:48:19 +08:00
giancarlo
d92d224250 Update UI of account selection component
Modified CSS styles in account-selector.tsx to enhance user experience. Added 'group' class for better hover effects and formatting for avatars. Also updated styling for account label to prevent overflow and ensure better readability.
2024-04-02 12:33:13 +08:00
giancarlo
7495dae062 Update UI elements and import paths in multiple files
This commit includes a series of UI improvements and import path adjustments across several files. Changes include using a different icon and adjusting the styling in mode-toggle.tsx, modifying class names in personal-account-dropdown.tsx, and updating the import paths in multiple files following the renaming of the 'personal-account-dropdown' to 'personal-account-dropdown-container'.
2024-03-29 01:11:03 +08:00
giancarlo
b4e714e580 Update tailwind config and implement personal account avatar
In this commit, we have made several updates to tailwind configuration files to ensure better scalability and include exceptions for node modules. Moreover, the account selector component now uses a personalized avatar for each account. This was achieved by accessing personal account data through a hook and introducing a new UserAvatar function to display the avatar. Check component was also migrated to CheckCircle and minor layout and styling adjustments were done for better UI experience.
2024-03-29 00:38:59 +08:00
giancarlo
efd2a757ff Update user authentication and sidebar config
This commit involves improving the user authentication process in the billing and accounts pages for better reliability. It also changes the name of 'organization-account-sidebar.config' to 'team-account-sidebar.config' for improved clarity and consistency.
2024-03-28 21:30:12 +08:00
giancarlo
041efb89fb Remove team account related services and actions
Removed services and actions related to team account deletion as well as updated paths within other dependent files, better reflecting their new locations. Also, added a new service titled 'AccountBillingService' for handling billing-related operations and restructured the form layout and handled translation in 'team-account-danger-zone' component.
2024-03-28 15:27:56 +08:00
giancarlo
ee507e0816 Refactor code and improve usage of package dependencies
This commit updates the naming convention of icons from Lucide-React, moving some package dependencies to "peerDependencies" in 'team-accounts', 'admin' and 'auth'. Additionally, it includes tweaks to the development server command in apps/web package.json and adds a logger reference to the shared package. Furthermore, cleanup work has been performed within the features and UI packages, and new scripts to interact with Stripe have been added to the root package.json.
2024-03-26 01:34:19 +08:00
giancarlo
bce3479368 Cleanup 2024-03-24 02:23:22 +08:00