Add a defautl style attribute in FormView
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
When a lot of items in self.styles share the same style commands (e.g. `locations`, `start_and_end_date_parts`, `available_languages`) it could be useful a __default item
to apply the same style in only one command.
```python
self.styles = {
'event_name_and_session_id': {
'style': 'Normal',
'space': 4.5,
'commands': [
('alignment', TA_CENTER),
('fontName', 'Helvetica'),
('fontSize', 18),
]
},
'vendor': {
'style': 'Normal',
'commands': [
('alignment', TA_CENTER),
('fontSize', 12),
],
'space': 4.5,
},
'start_and_end_date_parts': {
'style': 'Normal',
'commands': [
('alignment', TA_LEFT),
('fontSize', 8),
]
},
'locations': {
'style': 'Normal',
'commands': [
('alignment', TA_LEFT),
('fontSize', 8),
]
},
'available_languages':{
'style': 'Normal',
'commands': [
('alignment', TA_LEFT),
('fontSize', 8),
]
}
}
```
Take a look at render() function in form_view.FormView
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the render() function in form_view.FormView and inspect how self.styles entries are read, especially the repeated style and commands values shown in the issue. Implement support for a __default style entry so shared commands can be defined once, then verify that named entries still render with their own overrides and that the example styles produce the intended output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100