[WEB-3985] feat: common postcss config and local fonts across all plane applications#6998
[WEB-3985] feat: common postcss config and local fonts across all plane applications#6998sriramveeraghanta merged 3 commits intopreviewfrom
Conversation
## Walkthrough
This set of changes standardizes font imports across multiple projects by centralizing font-face declarations in a shared package. It updates CSS and TypeScript configurations to use new path aliases and package exports, removes redundant font imports, and simplifies PostCSS configurations by re-exporting from a common external config. Several package.json files are updated to include or reorder dependencies, and a global CSS file is deleted in favor of the new shared font import. Additionally, the font-face CSS is updated with new path formats and an added font weight.
## Changes
| File(s) | Change Summary |
|-------------------------------------------------------------------------------------------|----------------|
| admin/app/layout.tsx | Updated import comments and changed stylesheet import from relative to absolute path. Removed unused comments. |
| admin/package.json, space/package.json | Added `@plane/propel` to dependencies; reordered or reinserted `@plane/services` in admin. |
| admin/postcss.config.js, packages/propel/postcss.config.js, web/postcss.config.js | Simplified PostCSS config by re-exporting from `@plane/tailwind-config/postcss.config.js` and added ESLint directive. |
| admin/styles/globals.css, space/styles/globals.css, web/styles/globals.css | Replaced Google Fonts or URL imports with `@plane/propel/styles/fonts`; reformatted shadow variables in admin. |
| admin/tsconfig.json | Added new path alias `"@/styles/*"` for styles directory. |
| packages/propel/package.json | Added export entry for `"./styles/fonts"` pointing to the font CSS file. |
| packages/propel/src/styles/fonts/index.css | Changed font `src` paths to use `./`; added `Inter` font-face for weight 600. |
| packages/propel/src/globals.css | Deleted file containing Tailwind base, components, and utility imports, and some base styles. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant App as Application (admin/space/web)
participant Propel as @plane/propel
participant Fonts as @plane/propel/styles/fonts
App->>Propel: Import font styles via package dependency
Propel->>Fonts: Expose centralized font-face CSS
App->>Fonts: Apply font-face declarations globallySuggested labels
Suggested reviewers
Poem
|
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/propel/postcss.config.js (1)
1-2: Simplify PostCSS configuration via shared export
Re-exporting the PostCSS config from@plane/tailwind-configensures consistency across all Plane packages. Consider migrating this CommonJS pattern to ESM (import/export) to remove the ESLint disable comment and align with modern module standards.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
packages/propel/src/styles/fonts/Inter/inter-v13-latin-200.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Inter/inter-v13-latin-300.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Inter/inter-v13-latin-500.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Inter/inter-v13-latin-600.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Inter/inter-v13-latin-700.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Inter/inter-v13-latin-800.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Inter/inter-v13-latin-regular.woff2is excluded by!**/*.woff2packages/propel/src/styles/fonts/Material-Symbols-Rounded/material-symbols-rounded-v168-latin-regular.woff2is excluded by!**/*.woff2
📒 Files selected for processing (14)
admin/app/layout.tsx(1 hunks)admin/package.json(1 hunks)admin/postcss.config.js(1 hunks)admin/styles/globals.css(2 hunks)admin/tsconfig.json(1 hunks)packages/propel/package.json(1 hunks)packages/propel/postcss.config.js(1 hunks)packages/propel/src/globals.css(0 hunks)packages/propel/src/styles/fonts/main.css(7 hunks)packages/propel/src/styles/index.css(1 hunks)space/package.json(1 hunks)space/styles/globals.css(1 hunks)web/postcss.config.js(1 hunks)web/styles/globals.css(1 hunks)
💤 Files with no reviewable changes (1)
- packages/propel/src/globals.css
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (14)
packages/propel/package.json (1)
12-13: Exports Mapping Improved
The new./charts/*and./stylesexports expose chart components and centralized styles directly from@plane/propel. Ensure the target files (src/charts/*/index.tsandsrc/styles/index.css) are present and included in the published package.space/package.json (1)
25-25: Add @plane/propel as a dependency
Introducing@plane/propelintospacealigns with the centralized styling and font management strategy. Remember to update your lockfile and verify that using a wildcard*version fits your release workflow.packages/propel/src/styles/index.css (1)
1-1: Centralize font-face declarations
Importing./fonts/main.cssconsolidates all font-face rules into the shared style bundle. Confirm the relative path is accurate and that PostCSS or your build pipeline correctly processes CSS imports.admin/tsconfig.json (1)
9-10: Verify new TypeScript path aliases
Adding@/plane-admin/*and@/styles/*simplifies imports for shared components and global styles. Please rebuild or reload your TS server to ensure these aliases resolve correctly, and update any import statements accordingly.space/styles/globals.css (1)
1-1: Centralize font and style imports Consolidating your font imports via@import "@plane/propel/styles";correctly replaces multiple direct Google Fonts imports and aligns with the shared styling approach. Ensure the@plane/propeldependency is declared and installed in thespaceproject’spackage.json.admin/app/layout.tsx (2)
6-6: Clarify import grouping comment Updating the comment to// plane importsimproves the clarity of grouping for Plane-specific modules.
15-15: Use absolute alias for global stylesheet Switching toimport "@/styles/globals.css";matches your new TypeScript path alias. Please confirm that thepathssetting inadmin/tsconfig.jsonincludes an entry like"@/styles/*": ["styles/*"]so this resolves correctly.web/styles/globals.css (1)
1-1: Centralize font imports Replacing the URL-based font import with@import "@plane/propel/styles";streamlines dependency management and ensures consistent styling across Plane apps. Verify that the@plane/propeldependency is declared in the Web project’spackage.json.admin/package.json (1)
20-21: Add shared styling and services dependencies Including@plane/propeland re-inserting@plane/servicesis required for the new shared styles and utilities. Please ensure this is reflected in your lockfile (package-lock.json/yarn.lock) and that the correct versions are installed.admin/styles/globals.css (2)
1-1: Centralize font imports The new import@import "@plane/propel/styles";appropriately replaces individual Google Fonts imports with the shared style entry.
62-88: Reformat shadow custom properties Splitting the shadow variable declarations across multiple lines enhances readability without changing their values. Confirm that this formatting satisfies your project’s CSS linting/formatting rules.packages/propel/src/styles/fonts/main.css (1)
7-7: Path updates and font weight addition look good.The changes properly update the font file paths to use relative paths with the format
./Inter/...instead of the previousfonts/Inter/.... This is consistent with the centralization of font resources in the @plane/propel package.The addition of the Inter font with weight 600 fills a gap in the font weight range, providing more flexibility for typography across applications.
Also applies to: 16-16, 25-25, 34-35, 37-43, 52-52, 61-61, 70-70
web/postcss.config.js (1)
1-2: Good standardization of PostCSS config.The configuration now properly re-exports the PostCSS config from the central
@plane/tailwind-configpackage, which helps maintain consistency across all Plane applications. The ESLint disable comment is appropriate since requires are not typically allowed in TypeScript files.admin/postcss.config.js (1)
1-2: Good standardization of PostCSS config.This matches the changes in web/postcss.config.js, properly centralizing the PostCSS configuration by importing from the shared
@plane/tailwind-configpackage. This standardization helps ensure consistent styling behavior across all applications.
…ne applications (makeplane#6998) * [WEB-3985] feat: common postcss config and local fonts across all plane applications * improvement: split fonts into a separate exports
…ne applications (#6998) * [WEB-3985] feat: common postcss config and local fonts across all plane applications * improvement: split fonts into a separate exports
Description
This PR ensures that all Plane application uses common postcss configs and local fonts.
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
New Features
Chores