Add composite layout theme and header/footer management to the Base A…#8908
Add composite layout theme and header/footer management to the Base A…#8908v-mortenr wants to merge 1 commit into
Conversation
…pplication Ports the composite-layout feature (636293) from the internal Base Application: - New Reporting pages/codeunit for managing theme and header/footer parts and per-report / per-company configuration (CompositeLayoutLookupHelper, TenantReportLayoutCfg/Selection, theme & header/footer assignment pages). - Report Layouts page + Report Layouts Impl. extended with subtype-aware layout creation and the composite-part resolver. - Company Information surfaced for the shared company metadata across W1 and the localization layers. - d365busfullaccess permission grants and a Composite Layout Tests codeunit. AB#636293
|
@microsoft-github-policy-service agree company="Abakion A/S" |
| } | ||
| group(ReportLayoutDefaults) | ||
| { | ||
| Caption = 'Report Layout Defaults'; |
There was a problem hiding this comment.
Maybe the name here should be a bit more generic so that we can use it for other things? I remember (when discussing a different slice with Kennie) that he proposed having a section in Company Information called "Reporting" and he mentioned that your project would need it too. Should we maybe check with him?
| @@ -5,6 +5,7 @@ | |||
|
|
|||
| namespace Microsoft.Shared.Report; | |||
There was a problem hiding this comment.
minor: several of these files have .page instead of the usual .Page in their names
There was a problem hiding this comment.
ah, this one is not new, so no need to rename (but maybe we should keep the convention for the new ones)
| ExcelMultipleDataSheets := "Excel Sheet Configuration"::Default; | ||
| LayoutName := ''; | ||
| AvailableInAllCompanies := true; | ||
| DocumentReportExperienceEnabled := FeatureKeyManagement.IsDocumentReportExperienceEnabled(); |
There was a problem hiding this comment.
When introducing features like this, since eventually they will be activated by default, we usually wrap them with CLEAN preprocessor symbols so that when the enforcing becomes a reality it becomes straightforward to clean-up the code.
Whenever we branch off say for 29.0, as part of a clean-up we activate the symbol "CLEAN26" (3 releases behind) and if there's any code wrapped between #if not CLEAN26 #endif will go away. In this case you would use CLEAN29 for it to be enforced on 32 (or you check when you want this by default)
See examples of usages of FeatureManagementFacade.IsEnabled, they usually are accompanied by these symbols.
What & why
Adds composite report layouts to the Base Application: a report's Word layout can compose a shared Theme part and a shared Header/Footer part, configured independently and resolved at render time. Parts resolve across four levels — this layout → report default → company → global default — most-specific wins, with theme and header/footer resolved independently. This lets administrators manage branding centrally instead of duplicating it in every layout.
Includes:
src/Layers/W1/BaseApp/Foundation/Reporting):Composite Layout Lookup Helper(encode/decode part references + resolve the effective theme/header-footer and its source level) and the management/assignment pages (Tenant Report Layout Cfg/Selection, theme & header/footer assignment, new-part dialog, theme-and-header/footer box & list).Report Layoutspage andReport Layouts Impl.extended with subtype-aware layout creation (Theme / Header-Footer) and the composite resolver.Company Informationsurfaced for the shared company metadata (W1 + localization layers).D365 Bus Full Accessgrants for the new configuration tables.Composite Layout Testscodeunit (resolver precedence + theme/header-footer independence).Linked work
AB#636293
How I validated this
What I tested and the outcome
Composite Layout Testscodeunit covers: no configuration resolves to None (blank source); resolution and source at each level (this layout / report default / company / global default); header and theme resolving independently from different levels; the more-specific level winning over global; and composite-name encode/decode round-trip (lowercase GUID). Setup is data-agnostic (touches only data it creates).Risk & compatibility
InsertNewLayoutoverload is added; the original is kept).Company Informationchanges span W1 and the localization layers to surface the shared metadata consistently — please sanity-check the localization-layer edits during review.