Sub-Pages — Checklist¶
Part of: Sub-Pages guide See also: Best Practices | Overview | Main Pages Checklist
Use this checklist when creating a new sub-page. Items marked with ✦ are always required.
⚠️ Read 00-best-practices.md first — it contains essential rules that prevent common mistakes.
Files to Create¶
For Settings Tab ✦¶
⚠️ CREATION ORDER MATTERS: Files must be created in this exact order:
use<Entity>SettingsData.tsx— Data hook (provides data to Tabs)
<Entity>Tabs.tsx— Tabs component (entry point, renders Settings)
<Entity>Settings.tsx— Settings form (child of Tabs)The Settings component CANNOT exist without the Tabs component. The Tabs component extracts the entity ID from the URL, fetches data, and passes props to Settings.
File |
Description |
|---|---|
|
Data hook for API and state (create FIRST) |
|
Tabs component (entry point, create SECOND) |
|
Settings tab content (create THIRD) |
For Membership Tabs¶
File |
Description |
|---|---|
|
Members tab component |
|
Member Of tab component |
For Independent Sub-Pages¶
File |
Description |
|---|---|
|
Independent sub-page (e.g., |
For Table-Based Tabs¶
File |
Description |
|---|---|
|
Table tab component |
|
Add modal |
|
Delete modal |
Utility Files (If Needed)¶
File |
Description |
|---|---|
|
|
Files to Modify ✦¶
File |
Change |
|---|---|
|
Add route entries and imports |
|
⚠️ Set |
|
Add entity interface (if missing) |
|
Add RPC hooks |
⚠️ CRITICAL: The
showLink={true}change in the main page is frequently forgotten. Without it, table rows are not clickable and users cannot navigate to the sub-page. See 04-settings-tab.md for details.
Documentation Links (Optional)¶
File |
Change |
|---|---|
|
MANDATORY: Add entry for |
⚠️ CRITICAL: Missing entries cause runtime crashes. Always add the entry, even as an empty array. See sub-pages.md for details.
Naming Conventions¶
File Names¶
Component Type |
Pattern |
Example |
|---|---|---|
Tabs |
|
|
Settings |
|
|
Data hook |
|
|
URL Paths¶
Type |
Pattern |
Example |
|---|---|---|
Sub-page base |
|
|
Membership tab |
|
|
Import Conventions¶
Always use absolute imports starting with src/:
// ✅ Correct:
import OtpTokensManagedBy from "src/pages/OtpTokens/OtpTokensManagedBy";
// ❌ Wrong:
import OtpTokensManagedBy from "./OtpTokensManagedBy";
Data-Cy Attribute Conventions¶
<entity>-tab-<tab-name>
<entity>-tab-settings-button-<action>
<entity>-tab-settings-<field-type>-<field-name>
<entity>-tab-settings-kebab-<action>
Examples:
dns-zones-tab-settingsdns-zones-tab-settings-button-savedns-zones-tab-settings-textbox-idnsname
Validation Checklist¶
Functionality¶
[ ] Tabs component loads without errors
[ ] Data hook fetches entity data correctly
[ ] Settings tab displays all required fields
[ ] Save operation works with success/error alerts
[ ] Revert button restores original values
[ ] Refresh button reloads data
[ ] Help link opens contextual help panel (links shown if configured)
[ ] NotFound page shows for non-existent entities
[ ] Kebab Enable/Disable conditionally enabled based on status
[ ] Kebab actions show confirmation modals
For Table Tabs¶
[ ] Table displays data with correct columns
[ ] Pagination and search work
[ ] Add/Delete modals work
For Independent Sub-Pages¶
[ ]
useUpdateRoutehook called with parent pathname (for nav bar highlighting on refresh)[ ] Data loads from parent entity’s
_showAPI (withall: trueif needed)[ ] Table displays data with correct columns
[ ] Pagination and search work
[ ] Add modal fetches available items from correct API
[ ] Add operation uses correct entity-specific API (not generic
_add_member)[ ] Delete modal shows selected items
[ ] Delete operation uses correct entity-specific API (not generic
_remove_member)[ ] Success/error alerts display correctly
[ ] Page wrapped in
PageSectionfor proper alignment[ ] If created from scratch:
[ ] ASKED USER for required information (see 06-membership-tabs.md):
[ ] Data source (API + field, e.g.,
role_showwithmemberof_privilege)[ ] API call for listing available items (Add modal)
[ ] API response field for item identifier
[ ] Table column names
[ ] API call for Add operation (entity-specific)
[ ] API call for Delete operation (entity-specific)
[ ] Add modal UI pattern confirmation
For Membership Tabs (Standard)¶
[ ]
useUpdateRoutehook called with parent pathname (for nav bar highlighting on refresh)[ ] Member lists load correctly from
member_*ormemberof_*fields[ ] Add/Remove operations use
_add_member/_remove_memberwith correct entityType[ ] Entity ID fields handle array responses
[ ] Direct/Indirect toggle works (if enabled) or is hidden (
membershipDisabled={true})[ ] If new component created from scratch:
[ ] ASKED USER for required information before creating (see 06-membership-tabs.md):
[ ] Data source field (e.g.,
member_sysaccount)[ ] API call for listing available items
[ ] API response field for item identifier
[ ] Table column names
[ ] Entity type for
_add_member/_remove_membermutations[ ] Direct/Indirect toggle visibility
[ ] Add modal UI pattern confirmation
[ ] Add button enabled and functional
[ ] Add modal uses standard pattern (
MemberOfAddModal+DualListSelectorGeneric) OR user confirmed alternative[ ] Delete button enabled when items selected
[ ] Delete modal opens and removes correctly
[ ] NO placeholder tabs or empty content
Code Quality¶
[ ] No TypeScript errors
[ ] No ESLint errors (warnings ok if pre-existing)
[ ] All
data-cyattributes follow convention
Post-Generation Validation ✦¶
See 00-best-practices.md for the required validation commands.
Quick combined check:
npm run prettier:fix && npm run knip && npm run lint && npm run build
Quick Reference: Settings Props¶
<<Entity>Settings
<entity>={settingsData.<entity>}
original<Entity>={settingsData.original<Entity>}
metadata={settingsData.metadata}
on<Entity>Change={settingsData.set<Entity>}
onRefresh={settingsData.refetch}
isModified={settingsData.modified}
isDataLoading={settingsData.isLoading}
modifiedValues={settingsData.modifiedValues}
onResetValues={settingsData.resetValues}
pathname={pathname}
onOpenContextualPanel={onOpenContextualPanel} // REQUIRED: Help button handler
/>
⚠️ CRITICAL: The
onOpenContextualPanelprop is mandatory. The Tabs component must define this handler and wrap content withContextualHelpPanel.
Common Issues¶
See 08a-common-issues.md for detailed solutions to:
MemberOfToolbar missing props
Wrong table component imports
API array response handling
RTK Query skip option
Modal integration issues
Boolean status comparison failures