Add new text styles - #122
Conversation
5c4f58e to
e992062
Compare
e992062 to
fe480f5
Compare
| fontWeight: 'bold', | ||
| color: theme.color.text.system.strong, | ||
| }, | ||
| speciesLocalNameCompact: { |
There was a problem hiding this comment.
Als je binnen de factory method dit definieert:
const speciesLocalName = {
fontFamily: 'Ubuntu',
fontStyle: 'normal',
fontSize: 16,
lineHeight: 24,
fontWeight: 'bold',
color: theme.color.text.system.strong,
} satisfies Text['speciesLocalName']dan kun je hier dit doen:
speciesLocalName,
speciesLocalNameCompact: {
...speciesLocalName,
lineHeight: 22,
},There was a problem hiding this comment.
👍 aangepast
| fontFamily: 'Ubuntu', | ||
| fontStyle: 'normal', | ||
| fontSize: 10, | ||
| lineHeight: 14, |
There was a problem hiding this comment.
Dit was
lineHeight: theme.font.extraSmall.fontSize,oftewel 10, en die wijziging resulteert ook in de snapshot-verschillen. Was dit de bedoeling?
There was a problem hiding this comment.
Ik ga het maandag met Karel bespreken. Het design zegt 14 maar op dit moment is het 12 in Observation.
There was a problem hiding this comment.
Het design komt niet helemaal overeen met hoe wij het geïmplementeerd hebben, ofwel ik lees het anders. De juiste line height kan ofwel 12 ofwel 14 zijn, maar we houden het nu bij 12. Dat is hetzelfde als het oude InputPanel component in Observation.
Het klopt dat dit een verandering van de line height in het InputPanel in deze repo is. Gelukkig is de impact heel klein. In Observation en ObsIdentify gebruiken we dit centrale InputPanel nog niet met een label. Er is dus geen visueel verschil voor de gebruiker.
|
|
||
| export const createTextStyles = (theme: Theme) => | ||
| ({ | ||
| /* eslint-disable observation/no-function-without-logging */ |
There was a problem hiding this comment.
We hebben in eslint.config.mjs een uitzondering voor createStyles, daar kunnen we createTextStyles aan toevoegen, dan hoef je dat niet hier te doen.
There was a problem hiding this comment.
Daar zat ik al over te twijfelen. Als dat jou voorkeur heeft dan schrijf ik het nog even om.
Necessary for https://github.com/observation/app/pull/1373