- Issue created by @matoeil
- First commit to issue fork.
- Status changed to Needs review
over 1 year ago 10:20pm 15 June 2023 I've created a merge request with a new formatter - OfficeHoursFormatterSeparateTables, "Tables, split by season and exception". Where there are seasons and/or exceptions, the main hours are given the caption 'normal hours', and the seasons or exceptions are given their relevant labels.
I would suggest that separate tables is actually what I would have expected in terms of both UX and DX for this functionality, so this new formatter could just replace OfficeHoursFormatterTable anyway, but I've created it as a separate formatter for now.
- 🇳🇱Netherlands johnv
Off topic: After having seen your screen dumps, what is your opinion of #3152911: Move 'Closed text' to Comment column if enabled → ?
(Please respond in that issue.) - 🇳🇱Netherlands johnv
This is a nice addition, thanks.
Some initial remarks:
In the newest version, variable 'current' is renamed to 'is_current'.
The titles are centered. Is left-handed better?I think, from UX, thisis good to go. @matoeil, what do you think?
However, before committing, some refactoring is needed, where this new formatter calls the existing formater for each week / exceptions set / season. The current patch seems too complicated to read and maintain.
regards, John
- last update
about 1 year ago Patch Failed to Apply - 🇳🇱Netherlands johnv
Thank you,
I have used your MR to make the formatter code more reuseable in 🐛 Formatter table has incorrect header Fixed .
I noticed your code mixes up the '$table_class'.
I refactored your code to a drop-in patch. Sorry for not using the MR.I have one big problem with the new 'multiple tables' approach: the columns are not nicely aligned anymore. Please see the attached screenshots.
Also, we need to decide on where to put the Season/Exceptions title.
In attached screenshots 3 options are visible (Using Table Select List formatter - you can use Table formatter, too):
- as caption of the new table (in yellow, your addition),
- as column header of the new table ('Day'),
- as first column of a special timeslot (in green, like 'Wednesday' vs. 'Summer 2024') - 🇳🇱Netherlands johnv
Also,
multiple table breaks backwards compatibility, see office_hours_exceptions_preprocess_field(),
where
$formatter_rows = &$element['content']['#table']['#rows'];
now becomes
$formatter_rows = &$element['content']['#table'][$index]['#rows'];
(ITMT, this code seems redundant - only $exception_header['id'] must be set, but it is not documented for what reason.)
- last update
about 1 year ago Patch Failed to Apply - 🇳🇱Netherlands johnv
Please find attached a reroll of the patch. Sorry for not using MR's.
It solves the BC problems, since the original is now splitted in several elements, instead of subdivided.Still 2 open points, as stated in #9:
- Due to the new 'multiple tables' approach, the columns are not nicely aligned anymore. Please see the attached screenshots from #9.
- Also, we need to decide on where to put the Season/Exceptions title. In the screenshots 3 options are visible (Using Table Select List formatter - you can use Table formatter, too):
-- as caption of the new table (in yellow, your addition),
-- as column header of the new table ('Day'),
-- as first column of a special timeslot (in green, like 'Day'/'Wednesday' vs. 'Summer 2024') - last update
11 months ago Patch Failed to Apply - last update
10 months ago Patch Failed to Apply - 🇳🇱Netherlands johnv
This reroll decides to use the table caption, removing seasonHeader and ExceptionHeader items from the formatter, leaving the replacement of the 'Day' table header column as an alternative.
-
johnv →
committed 99bcd3ef on 8.x-1.x authored by
maxwellkeeble →
Issue #3355646 by maxwellkeeble, matoeil: Formatter: Each Season as...
-
johnv →
committed 99bcd3ef on 8.x-1.x authored by
maxwellkeeble →
- Status changed to Fixed
9 months ago 11:43am 16 February 2024 - 🇳🇱Netherlands johnv
Committed a final patch.
- It also contains necessary corrections for ✨ Add Formatter with Select list display Fixed
- Season/Exceptions title is now in the column headers, which are visible upon multiple tables. So, not in captions, not in extra table items/rows.Still some open points:
- Due to the new 'multiple tables' approach, the columns are not nicely aligned anymore. Please see the attached screenshots from #9. -
johnv →
committed 02218916 on 8.x-1.x authored by
maxwellkeeble →
Issue #3355646 by maxwellkeeble, matoeil: Formatter: Each Season as...
-
johnv →
committed 02218916 on 8.x-1.x authored by
maxwellkeeble →
Automatically closed - issue fixed for 2 weeks with no activity.