docs(agents): add styling and table playbooks - #236
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d499ae6e01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `Begin`, `BeginChild`, and `BeginTabBar` require their matching `End*` | ||
| even when the boolean return value is `false`; `BeginTable`, `BeginPopup`, |
There was a problem hiding this comment.
Pair EndTabBar only after a successful BeginTabBar
When BeginTabBar() returns false, it has not opened a tab-bar scope, so following this rule and calling EndTabBar() can trigger Dear ImGui assertions or corrupt its internal stack. Move BeginTabBar into the conditional group alongside BeginTable, BeginPopup, and BeginCombo.
Useful? React with 👍 / 👎.
|
|
||
| - Search consumer code for raw `PushStyleVar`, `PushStyleColor`, and matching | ||
| `PopStyle*` calls. Replace temporary overrides with RAII guards. | ||
| - Verify every `Begin*` has an unconditional matching `End*`. |
There was a problem hiding this comment.
Limit unconditional End calls to Begin and BeginChild
Applying this checklist literally to BeginTable, BeginPopup, BeginCombo, or BeginTabBar would call the corresponding End* without an active scope whenever Begin* returns false. Replace “every Begin*” with the API-specific rule already described above so the checklist does not direct agents to introduce assertion failures.
AGENTS.md reference: AGENTS.md:L758-L760
Useful? React with 👍 / 👎.
| const ImGuiX::Extensions::ScopedStyleColor border( | ||
| ImGuiCol_Border, ImGui::GetStyle().Colors[ImGuiCol_Border]); | ||
|
|
||
| const bool content_visible = ImGui::BeginChild("panel"); |
There was a problem hiding this comment.
Enable padding for the child in the scoped-style example
Copied as written, this overload uses ImGuiChildFlags_None; Dear ImGui suppresses WindowPadding for a borderless child unless ImGuiChildFlags_AlwaysUseWindowPadding is set, so the showcased 24×20 scoped padding has no effect. Pass that child flag, as the table playbook does, so this example actually demonstrates the override it recommends.
Useful? React with 👍 / 👎.
Summary\n\n- document correct RAII scope and Dear ImGui Begin/End lifecycle rules\n- add theme ownership and custom-token guidance\n- add reusable table/data-panel patterns\n- document filtered visible-projection selection and copy behavior\n- link the new playbooks from AGENTS.md and agents/README.md\n\n## Validation\n\n- git diff --check\n- documentation-only change