-
Notifications
You must be signed in to change notification settings - Fork 0
Mario mark #15
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
Closed
Closed
Mario mark #15
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
628b649
beefed up the getting started section, centered width limited contain…
methodofaction 5c55a99
Merge branch 'main' of github.com:invopop/popui.go into improvements
methodofaction 2da0d53
re-adding removed icons
methodofaction d645c6b
remove unnecessary markup
methodofaction 11487ff
re-add icons which were accidentally removed
methodofaction 20b7916
changes
methodofaction 76ac99c
changes
mariocnovoa 1fd98b8
mario's changes
methodofaction a79a1fb
Fixes for running air
methodofaction e1f7fbe
add theme icon
methodofaction 15d8641
auto generate icons list page
methodofaction b063362
improvements to the tokens page
methodofaction 2e51afc
many changes
methodofaction 94b8a71
downgrading go to get netlify to deploy
methodofaction 392d54d
popui prism deploy fix
methodofaction 07272f7
improvements
methodofaction d82c42c
Merge branch 'main' of github.com:invopop/popui.go
methodofaction 71dcbe2
Merge branch 'main' into mario-mark
methodofaction 68e6f6d
changes:
methodofaction f01b312
Potential fix for code scanning alert no. 3: Prototype-polluting func…
methodofaction 93bf4f2
small fixes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # - | ||
| --- | ||
| description: PopUI project build process, architecture, and development workflow | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| @AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # PopUI Build & Architecture | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Go component library using [templ](https://templ.guide) for HTML templating and Tailwind CSS v4 for styling. The dev server runs via `air` on port 3000. | ||
|
|
||
| ## Build Pipeline | ||
|
|
||
| There are two independent build steps: | ||
|
|
||
| ### 1. Tailwind CSS (manual) | ||
|
|
||
| ```bash | ||
| tailwindcss -i styles.css -o assets/popui.css --minify | ||
| ``` | ||
|
|
||
| Run this whenever you add new Tailwind classes that aren't already in `assets/popui.css`. The CSS is **embedded** into the Go binary via `//go:embed assets/*` in `assets.go`, so a Go rebuild is also needed after regenerating CSS. | ||
|
|
||
| After rebuilding CSS, trigger an air rebuild by touching any `.templ` file: | ||
|
|
||
| ```bash | ||
| tailwindcss -i styles.css -o assets/popui.css --minify && touch layout.templ | ||
| ``` | ||
|
|
||
| If dynamically constructed class names are needed (e.g. `"shadow-" + name`), add them to the `@source inline(...)` safelist in `styles.css`. | ||
|
|
||
| ### 2. Go + Templ (automatic via air) | ||
|
|
||
| Air watches `.templ`, `.go`, and other source files and runs: | ||
|
|
||
| ``` | ||
| templ generate && go build ./cmd/popui | ||
| ``` | ||
|
|
||
| Air does **not** rebuild CSS. It excludes `assets/popui.css` from its watch list. | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| The `tailwindcss` CLI must be installed on your system. Install via npm globally: | ||
|
|
||
| ```bash | ||
| npm install -g @tailwindcss/cli | ||
| ``` | ||
|
|
||
| There are **no npm dependencies** in this project. The Tailwind plugins (`@tailwindcss/forms`, `@tailwindcss/typography`) and their runtime dependencies are vendored in the `tailwind/` directory. The `styles.css` entry point references them via local paths: | ||
|
|
||
| ```css | ||
| @import "./tailwind/node_modules/tailwindcss" source(none); | ||
| @plugin "./tailwind/forms.js"; | ||
| @plugin "./tailwind/typography/index.js"; | ||
| ``` | ||
|
|
||
| To update vendored plugins, replace the files in `tailwind/` with newer versions from npm and test with a full CSS rebuild. | ||
|
|
||
| ## Key Directories | ||
|
|
||
| - `*.templ` (root) - Core PopUI components | ||
| - `props/` - Go structs for component props | ||
| - `icons/` - Auto-generated icon components (via `go generate` from SVG source files) | ||
| - `internal/docs/` - Documentation site pages and component examples | ||
| - `internal/docs/components/` - Individual component doc pages | ||
| - `internal/docs/examples/` - Example usage for each component | ||
| - `examples/` - Full application examples (admin, app, console, wizard, etc.) | ||
| - `cmd/popui/serve.go` - Dev server routes | ||
| - `assets/popui.css` - Compiled CSS (embedded in binary, do not edit directly) | ||
| - `styles.css` - Tailwind CSS entry point | ||
| - `tailwind.theme.css` - Design tokens (colors, shadows, spacing) | ||
| - `tailwind/` - Vendored Tailwind plugins (@tailwindcss/forms, @tailwindcss/typography) and their dependencies | ||
| - `components.css` - Custom CSS beyond Tailwind utilities | ||
|
|
||
| ## Icons | ||
|
|
||
| Icons are generated from SVG files. The generator at `icons/generate.go` produces: | ||
| - `icons/icons_list.templ` - Icon templ components | ||
| - `internal/docs/components/icons_list.templ` - Docs icon gallery page | ||
|
|
||
| Run with `go generate ./icons/` (requires the popui SVG source repo at `../../popui/icons/themes`). | ||
|
|
||
| When adding icons manually to `icons/icons_list.templ`, they are automatically included in the docs gallery. | ||
|
|
||
| ## Templ Conventions | ||
|
|
||
| - `.templ` files contain the source templates | ||
| - `_templ.go` files are auto-generated (never edit manually) | ||
| - Components accept props via variadic `...props.Type` pattern | ||
| - Use `@popui.ComponentName(props)` syntax to compose components |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.