Skip to content

Add show_descr flag to control subcolumn description display - #54

Draft
abapsheep wants to merge 1 commit into
mainfrom
claude/compassionate-feynman-zhxyyb
Draft

abapsheep wants to merge 1 commit into
mainfrom
claude/compassionate-feynman-zhxyyb

Conversation

@abapsheep

Copy link
Copy Markdown
Member

Summary

Adds a show_descr boolean flag to subcolumns that controls whether field descriptions are displayed. This allows users to toggle description visibility per subcolumn while maintaining backward compatibility with layouts created before this feature existed.

Key Changes

  • Type Definition: Added show_descr field to ty_s_sub_columns structure in layout manager
  • Parsing Logic: Enhanced subcolumn parsing to read description flags from the stored format (field name followed by flag: X for show, space for hide)
    • Implements legacy mode detection for layouts without flags (defaults to showing descriptions)
    • Handles edge case where trailing flags may be lost in CHAR database fields
  • UI Updates: Added checkbox control in layout popup to allow users to toggle "Show Description" per subcolumn
  • Serialization: Updated subcolumn storage format to include flags after each field name
  • Display Logic: Modified XML builder to conditionally prepend field label based on show_descr flag
  • New Subcolumns: Default new subcolumns to show_descr = true to maintain expected behavior

Implementation Details

  • Backward compatible: layouts without flags automatically show descriptions (legacy mode)
  • Storage format: fieldname1 X fieldname2 (flags follow field names)
  • Robust parsing: handles empty entries and missing trailing flags gracefully
  • Updated badge: incremented control count from 88 to 89

https://claude.ai/code/session_01791nMGFPMRX4VNDLzWpfdQ

The subcolumn dialog of Z2UI5_CL_LAYO_POP now carries a "Show Description"
checkbox per line, so a subcolumn can be rendered with or without its label
in front of the value. Rendering a subcolumn without its label was not
possible before, the label was always written.

The flag travels in the SUBCOLUMN field of the layout position next to the
field name it belongs to: field name, space, flag (`X` or space), and so on.
Layouts saved before the flag existed list field names only; there the
description keeps being shown, so existing layouts render as before. New
lines are added with the flag set for the same reason.

One round trip stays lossy: the CHAR field of the layout position cannot
hold a trailing blank, so a single subcolumn whose flag is off is read back
as a flagless (legacy) entry and shows its description again. Every other
combination survives the database.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01791nMGFPMRX4VNDLzWpfdQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants