microsoft / microsoft/AdaptiveCards
Control default styling for "style":"heading" via host config
Open
Nobody has claimed this yet.
Breaking Change
Epic
Spec
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
This work tracks adding a host config setting to change the defaults for text blocks that have "style" : "heading".
This will be accomplished with the following changes:
textStyleswill be added to host config. For this feature the only style supported will beheadingas shown below with the default values set:
"textStyles": {
"heading": {
"size": "large",
"weight": "bolder",
"color": "default",
"isSubtle": false,
"fontType": "default"
}
}
- The
headingshost config previously introduced will be renamed as follows. The heading level is not included in thetextStyleabove directly because in the futuretextStylemay be applied to text other thanTextBlockwhereheadingLevelwill not apply (TextRun, input labels, etc.). Configuration of per-style heading level is out of scope for this epic:
"textBlock": {
"headingLevel": 2
}
- The existing text styling host config class will be renamed to indicate that it is
FactSetspecific. This is a BREAKING CHANGE for the API surfaces. - A base text style config class covering
size,weight,color,isSubtle, andfontTypeshould be introduced, with theFactSetspecific class inheriting from it. - The
styleproperty onTextBlockwill be made nullable. If unset the default style will be applied. (In the future, aTextBlockwith an unsetstylemay inherit it's style from it's container. Such features are out of scope of this epic.) - The
size,weight,color,isSubtle, andfontTypeproperties onTextBlockwill be made nullable. If these properties are unset, theTextBlockwill be rendered using the values defined in the host config for the given style. Ifstyleis unset, theTextBlockwill be rendered using the documented defaults for the property. This is a BREAKING CHANGE for the API surfaces. - The above properties will also be made nullable on
TextRun. This both simplifies the implementation as those properties are inherited from a shared base class in several of our implementations, and allows forstyleonTextRunin the future. This is a BREAKING CHANGE for the API surfaces. - Adding
styletoTextRunis out of scope for this epic because the only style we currently support isheading, which doesn't make sense on aTextRun. - The existing
paragraphstyle will be renameddefault. - The ability to configure the default style and the introduction of any styles other than heading are out of scope for this epic, but may be added in the future.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the host config, TextBlock, TextRun, and existing FactSet-specific text styling definitions in the C# implementation. Trace how their properties are rendered and how API changes are tested; done means the heading defaults, nullable properties, renames, inheritance, and documented out-of-scope boundaries are represented consistently across the affected API surfaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100