From c9e5a7d87405a2f674a651f3f3acc587a0875849 Mon Sep 17 00:00:00 2001 From: ivarsbariss Date: Thu, 26 Feb 2026 15:47:36 +0100 Subject: [PATCH] Share project's cursor skills --- .cursor/skills/navigation-button-add/SKILL.md | 30 +++++++++++++++++++ .gitignore | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .cursor/skills/navigation-button-add/SKILL.md diff --git a/.cursor/skills/navigation-button-add/SKILL.md b/.cursor/skills/navigation-button-add/SKILL.md new file mode 100644 index 0000000..cc6fe67 --- /dev/null +++ b/.cursor/skills/navigation-button-add/SKILL.md @@ -0,0 +1,30 @@ +--- +name: navigation-button-add +description: Implements a new Sales navigation button with the existing highlight/default colors. Use when the user asks to add buttons to the nav block, mentions “Units Ordered”, “Units Shipped”, or “Sales” navigation, or instructs to keep the highlight behavior consistent with the latest change. +--- + +# Navigation Button Addition + +## Instructions + +1. **Understand the current navigation canvas** by checking `pages/*/widgets/Container1/Button*`. Each Sales page reuses the same container; the existing buttons are `Button1` (Capacity Planning), `Button1Copy` (Units Shipped), and `Button1Copy2` (Units Ordered). +2. **Follow the established color scheme**: + - The highlighted button uses `appsmith.theme.colors.backgroundColor`. + - The inactive buttons use `#ffffff`. +3. **When adding a new navigation button**: + - Copy one of the existing `Button*` definitions, adjusting `text`, `onClick`, `widgetId`, `widgetName`, `bottomRow`, and any other placement metadata so it fits below the existing items. + - Set `buttonColor` to `#ffffff` (inactive) unless the new button replaces the active page; then set its own definition (`on the relevant page`) to `appsmith.theme.colors.backgroundColor`. + - Ensure `dynamicBindingPathList` stays empty when `buttonColor` is static white; populate it only if the button needs dynamic logic. + - Point `onClick` to `navigateTo` the new page slug and keep `placement`/`responsiveBehavior` matching other nav buttons. +4. **Update documentation**: After modifying navigation, update `docs/README.md` with a short note about the new button and its color behavior. +5. **Run git status/diff** to verify only the intended files changed before reporting back. + +## Examples + +- *Adding “Units Ordered” button*: + 1. Copy `Button1Copy` (Units Shipped) in each page’s `Container1`. + 2. Set `text` to “Units Ordered”, `onClick` to `navigateTo('Sales - Units Ordered', {}, 'SAME_WINDOW');`. + 3. Assign `buttonColor` to `#ffffff` for inactive cases and to `appsmith.theme.colors.backgroundColor` inside the `Sales - Units Ordered` page definition for highlight. + 4. Adjust `bottomRow` incrementally so buttons stack vertically. + 5. Mention the update in `docs/README.md`. + diff --git a/.gitignore b/.gitignore index 8c6d268..8b03f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ # Cursor AI reference documentation (internal use only) -.cursor/ +.cursor/* +!.cursor/skills/ +!.cursor/skills/**