Skip to content

uc-apx create region comments

Insert a themeTemplateComponent/comments region backed by an inline SQL query — a threaded discussion / status-feed list.

Required mappings: —comment-text-column, —user-name-column, —date-column.

Optional avatar (—avatar-type initials|icon + source), chat styling (—style chatSpeechBubbles + —alignment-column), and per-row actions (—action POS[:LABEL], POS ∈ avatarLink|userNameLink|actions).

uc-apx create region comments [flags]
FlagTypeDefaultDescription
--actionstringArrayPer-row action POS[:LABEL] (repeatable). POS ∈ avatarLink, userNameLink, actions
--alignment-columnstringColumn driving inbound/outbound alignment (emitted as &COL.)
--apply-theme-colorsSet settings.applyThemeColors (only emitted when the flag is passed)
--attributesstringTrailing attributes/metadata (static text or substitution, e.g. (&CREATED.))
--avatar-iconstringStatic fa-* class (when —avatar-type icon)
--avatar-initials-columnstringColumn holding initials (when —avatar-type initials)
--avatar-shapestringAvatar shape: rounded, circular, square (optional)
--avatar-typestringAvatar source type for plugin-avatar: initials or icon
--columnstringComma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required]
--column-spanint12-col grid span for the region’s layout (0 = omit)
--comment-text-columnstringColumn mapped to the comment body [required]
--date-columnstringColumn mapped to the comment date [required]
--dry-runPrint rendered region to stdout without writing
--entity-pluralstringentityTitle.plural, e.g. comments (optional)
--entity-singularstringentityTitle.singular, e.g. comment (optional)
--forceReplace an existing same-id region on the page
--idstringRegion id (default: kebab-case of —name)
--namestringDisplay name of the region [required]
--no-new-rowEmit startNewRow: false so this region sits next to the previous one
--pagestringTarget page (numeric ID, alias, or name) [required]
--pagination-rowsintentitiesPerPage for pagination (0 = omit)
--pagination-total-countSet pagination.showTotalCount: true (requires —pagination-rows)
--pk-columnstringColumn to flag as the primary key (optional)
--row-selectionstringRow selection: multiple, single, or focusOnly
--sequenceintLayout sequence (default: max existing + 10)
--slotstringbodyPage slot to place the region in
--sqlstringInline SQL query (or @path/to/file.sql; @@ escapes a literal leading @) [required]
--stylestringComments style: chatSpeechBubbles (settings.style)
--user-name-columnstringColumn mapped to the comment author [required]
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
uc-apx --app-dir examples/brookstrut create region comments --page 46 --name Discussion --sql select id, body, author, created from comments --column ID:number,BODY,AUTHOR,CREATED:timestamp --pk-column ID --comment-text-column BODY --user-name-column AUTHOR --date-column CREATED --dry-run
Generated APEXlang
region discussion (
name: Discussion
type: themeTemplateComponent/comments
source {
location: localDatabase
type: sqlQuery
sqlQuery:
```sql
select id, body, author, created from comments
```
}
layout {
sequence: 50
slot: body
}
appearance {
template: @/blank-with-attributes-no-grid
templateOptions: #DEFAULT#
}
componentAppearance {
display: report
}
settings {
commentText: BODY
userName: AUTHOR
date: CREATED
}
column ID (
layout {
sequence: 10
}
source {
databaseColumn: ID
dataType: number
primaryKey: true
}
)
column BODY (
layout {
sequence: 20
}
source {
databaseColumn: BODY
dataType: varchar2
}
)
column AUTHOR (
layout {
sequence: 30
}
source {
databaseColumn: AUTHOR
dataType: varchar2
}
)
column CREATED (
layout {
sequence: 40
}
source {
databaseColumn: CREATED
dataType: timestamp
}
)
)