Skip to content

feat(eslint-pligin-fiori-tools): report page section name in table rules#4572

Draft
AlinaGovoruhina wants to merge 8 commits intomainfrom
feat/eslint-fiori/report-page-section-name
Draft

feat(eslint-pligin-fiori-tools): report page section name in table rules#4572
AlinaGovoruhina wants to merge 8 commits intomainfrom
feat/eslint-fiori/report-page-section-name

Conversation

@AlinaGovoruhina
Copy link
Copy Markdown
Contributor

@AlinaGovoruhina AlinaGovoruhina commented Apr 17, 2026

Report Page Section Name in ESLint Plugin Fiori Tools Table Rules

New Features

✨ ESLint rule diagnostic messages for table-related rules in the eslint-plugin-fiori-tools package now include the page section name when the table is located inside an Object Page section. This provides more precise and context-aware error messages to help developers identify which specific section's table is misconfigured.

Changes

  • diagnostics.ts: Added optional pageSectionName?: string field to several diagnostic interfaces: WidthIncludingColumnHeaderDiagnostic, CreationModeForTable, CopyToClipboard, EnableExport, EnablePaste, TablePersonalization, and CondensedTableLayout.

  • annotations.ts: Extended AnnotationBasedNode with an optional label field. Section label is now extracted from UI.Facets annotation PropertyValue records and passed into createTableSection and addHeaderSection, which in turn populate label on the resulting nodes.

  • fe-v2.ts / fe-v4.ts: Added optional label?: string to the AnnotationBasedNode interface in both V2 and V4 linkers.

  • sap-copy-to-clipboard.ts: Unified V2/V4 handling into a single handleCopyInTable function and a shared checkConfiguration helper. Object page sections are now iterated to pass tableSection.annotation?.label as pageSectionName. Error message updated to include {{sectionText}}.

  • sap-creation-mode-for-table.ts: Updated reportDiagnostic, validateCreateModeV2, processTableV2, validateCreationModeV4, and processTableV4 to accept and propagate pageSectionName. Object page table iteration now uses sections instead of flat lookup. Error messages updated to include {{sectionText}}.

  • sap-enable-export.ts: Refactored handleExportInTableV4 to distinguish list report and object page sections. Extracted checkConfiguration helper with pageSectionName support. Message now uses {{sectionText}}.

  • sap-enable-paste.ts: Same refactoring pattern as sap-enable-export.ts, with section-aware iteration and updated message template.

  • sap-table-personalization.ts: Extracted checkTableConfiguration helper that passes tableSection.annotation?.label for object pages. checkPersonalizationValue now accepts pageSectionName and propagates it to all reported diagnostics. Error messages updated.

  • sap-width-including-column-header.ts: Extracted checkTable helper with tableSectionName support. checkTablesInPage now handles list report and object page separately. Message changed to use {{sectionText}} instead of table annotation path.

  • annotation.xml (test data): Fixed a typo ("Prducts""Products") and minor formatting cleanup.

  • test-helper.ts: Fixed label typo in V4_FACETS_ANNOTATIONS ("Prducts""Products").

  • sap-copy-to-clipboard.test.ts, sap-enable-export.test.ts, sap-enable-paste.test.ts, sap-table-personalization.test.ts, sap-width-including-column-header.test.ts: Updated existing tests to assert full messages (including section names) instead of messageId, and added new invalid test cases covering object page section scenarios.

  • 🔄 Regenerate and Update Summary

📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

PR Bot Information

Version: 1.20.11 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet
  • Output Template: Default Template
  • Summary Prompt: Default Prompt
  • Correlation ID: bc301571-3a96-4115-b847-53de15401511
  • Event Trigger: pull_request.opened

@AlinaGovoruhina AlinaGovoruhina added the eslint-plugin-fiori-tools @sap-ux/eslint-plugin-fiori-tools label Apr 17, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: 96e5336

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sap-ux/eslint-plugin-fiori-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eslint-plugin-fiori-tools @sap-ux/eslint-plugin-fiori-tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant