feat(eslint-pligin-fiori-tools): report page section name in table rules#4572
Draft
AlinaGovoruhina wants to merge 8 commits intomainfrom
Draft
feat(eslint-pligin-fiori-tools): report page section name in table rules#4572AlinaGovoruhina wants to merge 8 commits intomainfrom
AlinaGovoruhina wants to merge 8 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 96e5336 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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-toolspackage 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 optionalpageSectionName?: stringfield to several diagnostic interfaces:WidthIncludingColumnHeaderDiagnostic,CreationModeForTable,CopyToClipboard,EnableExport,EnablePaste,TablePersonalization, andCondensedTableLayout.annotations.ts: ExtendedAnnotationBasedNodewith an optionallabelfield. Section label is now extracted fromUI.FacetsannotationPropertyValuerecords and passed intocreateTableSectionandaddHeaderSection, which in turn populatelabelon the resulting nodes.fe-v2.ts/fe-v4.ts: Added optionallabel?: stringto theAnnotationBasedNodeinterface in both V2 and V4 linkers.sap-copy-to-clipboard.ts: Unified V2/V4 handling into a singlehandleCopyInTablefunction and a sharedcheckConfigurationhelper. Object page sections are now iterated to passtableSection.annotation?.labelaspageSectionName. Error message updated to include{{sectionText}}.sap-creation-mode-for-table.ts: UpdatedreportDiagnostic,validateCreateModeV2,processTableV2,validateCreationModeV4, andprocessTableV4to accept and propagatepageSectionName. Object page table iteration now uses sections instead of flat lookup. Error messages updated to include{{sectionText}}.sap-enable-export.ts: RefactoredhandleExportInTableV4to distinguish list report and object page sections. ExtractedcheckConfigurationhelper withpageSectionNamesupport. Message now uses{{sectionText}}.sap-enable-paste.ts: Same refactoring pattern assap-enable-export.ts, with section-aware iteration and updated message template.sap-table-personalization.ts: ExtractedcheckTableConfigurationhelper that passestableSection.annotation?.labelfor object pages.checkPersonalizationValuenow acceptspageSectionNameand propagates it to all reported diagnostics. Error messages updated.sap-width-including-column-header.ts: ExtractedcheckTablehelper withtableSectionNamesupport.checkTablesInPagenow 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 inV4_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 ofmessageId, and added new invalid test cases covering object page section scenarios.📬 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 | 💬 Feedbackanthropic--claude-4.6-sonnetbc301571-3a96-4115-b847-53de15401511pull_request.opened