2.2 KiB
2.2 KiB
name, description
| name | description |
|---|---|
| navigation-button-add | 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
- Understand the current navigation canvas by checking
pages/*/widgets/Container1/Button*. Each Sales page reuses the same container; the existing buttons areButton1(Capacity Planning),Button1Copy(Units Shipped), andButton1Copy2(Units Ordered). - Follow the established color scheme:
- The highlighted button uses
appsmith.theme.colors.backgroundColor. - The inactive buttons use
#ffffff.
- The highlighted button uses
- When adding a new navigation button:
- Copy one of the existing
Button*definitions, adjustingtext,onClick,widgetId,widgetName,bottomRow, and any other placement metadata so it fits below the existing items. - Set
buttonColorto#ffffff(inactive) unless the new button replaces the active page; then set its own definition (on the relevant page) toappsmith.theme.colors.backgroundColor. - Ensure
dynamicBindingPathListstays empty whenbuttonColoris static white; populate it only if the button needs dynamic logic. - Point
onClicktonavigateTothe new page slug and keepplacement/responsiveBehaviormatching other nav buttons.
- Copy one of the existing
- Update documentation: After modifying navigation, update
docs/README.mdwith a short note about the new button and its color behavior. - Run git status/diff to verify only the intended files changed before reporting back.
Examples
- Adding “Units Ordered” button:
- Copy
Button1Copy(Units Shipped) in each page’sContainer1.
- Copy
- Set
textto “Units Ordered”,onClicktonavigateTo('Sales - Units Ordered', {}, 'SAME_WINDOW');. - Assign
buttonColorto#fffffffor inactive cases and toappsmith.theme.colors.backgroundColorinside theSales - Units Orderedpage definition for highlight. - Adjust
bottomRowincrementally so buttons stack vertically. - Mention the update in
docs/README.md.