-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar module: Vertical alignment with wrapping #3053
Comments
cannot reproduce this with this calendar config: {
module: "calendar",
header: "German Holidays",
position: "top_left",
config: {
fadePoint: 0.4,
hideTime: true,
showTimeToday: true,
maximumNumberOfDays: 90,
maximumEntries: 8,
displaySymbol: true,
colored: true,
coloredSymbolOnly: true,
wrapEvents: true,
timeFormat: "relative",
nextDaysRelative: true,
hideOngoing: false,
getRelative: 0,
calendars: [
{
symbol: 'user-friends',
color: '#fff380',
url: "https://calendar.google.com/calendar/ical/de.german%23holiday%40group.v.calendar.google.com/public/basic.ics"
}
]
}
}, Did you change css via |
I'll grab the CSS when I'm at a keyboard, but in your repro attempt the event name wraps and the date string doesn't. In what I'm seeing, the date string is wrapped and the event name isn't. (Note the second line, which matches yours.) |
Can now reproduce with this ics: BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:[email protected]
X-WR-TIMEZONE:Europe/Zurich
BEGIN:VTIMEZONE
TZID:Etc/UTC
X-LIC-LOCATION:Etc/UTC
BEGIN:STANDARD
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
TZNAME:GMT
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;VALUE=DATE:20230227
DTEND;VALUE=DATE:20230313
DTSTAMP:20210421T154106Z
UID:[email protected]
REATED:20200831T200244Z
DESCRIPTION:
LAST-MODIFIED:20200831T200244Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Birthday
TRANSP:OPAQUE
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:This is an event reminder
TRIGGER:-P0DT7H0M0S
END:VALARM
END:VEVENT |
Here's my
I don't see anything there I would expect to affect this. It looks like it happens when the date wraps, and the default rendering of a single-day event doesn't do that very often. |
the calendar content is rows and columns in and html table how does tr/td handle wrap? |
the row (tr)expands to wrap the largest element in the table. default td centering is centered. horizontal & vertical |
this can be fixed by adding .calendar .table {
vertical-align: top;
} in the I'm not sure if this should be done in |
nice. think it should be custom.css |
While I'm certainly happy to fix my edge-case locally, it seems unfortunate to leave a bug in because it's difficult to do CSS targeting. Is that an existing concern with the calendar module, that CSS changes can impact other modules by accident? |
I'd be perfectly happy with center-alignment, too, so long as they're all the same. The weird part is two columns aligning top and one aligning center; I think either way looks fine if they're consistent. |
the time column is not aligning top, what u see is a side affect of the need to wrap the text. which centers the wrapped result vertically if this is a bug, it's the symbol alignment |
removing the first 3 lines (display, flex-direction, justify-content) in this section in .calendar .symbol {
display: flex;
flex-direction: row;
justify-content: flex-end;
padding-left: 0;
padding-right: 10px;
font-size: var(--font-size-small);
} |
maybe @rejas remembers why he introduced this |
I could certainly be using the wrong terms, but if you look at the case where the event name wraps and the time doesn't, the time string (and the icon) aligns with the first line of the wrapped event name. |
@MikeBishop just an accident of the table expansion |
most probably because anyway, I'd go for more flex alignements in the normal css to have a general good look in our calendar. |
thanks, so I looked where the Here one picture from this PR: The Icon was set to So I think we should align all columns to top which would fix this issue. |
hope my accepted #3033 pr doesn't break things further... |
I think your PR did just fine :-) |
The title column was vertical centered before. Fixes #3053
I'm having an issue where the maxTitleLength: '29', isn't respected. Doesn't matter what number I put in there. The full title length is displayed. Anyone have any ideas? Here the max title length displayed is more than 29 characters, making the entire mirror misalign. `
` |
please remove the quotes from the numeric values.
numbers should not have quotes, |
## [2.23.0] - 2023-04-04 Thanks to: @angeldeejay, @buxxi, @CarJem, @dariom, @DaveChild, @dWoolridge, @grenagit, @Hirschberger, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @nfogal, @psieg, @rajniszp, @retroflex, @SkySails and @tomzt. Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you guys! You are awesome! ### Added - Added increments for hourly forecasts in weather module (#2996) - Added tests for hourly weather forecast - Added possibility to ignore MagicMirror repo in updatenotification module - Added Pirate Weather as new weather provider (#3005) - Added possibility to use your own templates in Alert module - Added error message if `<modulename>.js` file is missing in module folder to get a hint in the logs (#2403) - Added possibility to use environment variables in `config.js` (#1756) - Added option `pastDaysCount` to default calendar module to control of how many days past events should be displayed - Added thai language to alert module - Added option `sendNotifications` in clock module (#3056) ### Removed - Removed darksky weather provider - Removed unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle (#2896) ### Updated - Use develop as target branch for dependabot - Update issue template, contributing doc and sample config - The weather modules clearly separates precipitation amount and probability (risk of rain/snow) - This requires all providers that only supports probability to change the config from `showPrecipitationAmount` to `showPrecipitationProbability`. - Update tests for weather and calendar module - Changed updatenotification module for MagicMirror repo only: Send only notifications for `master` if there is a tag on a newer commit - Update dates in Calendar widgets every minute - Cleanup jest coverage for patches - Update `stylelint` dependencies, switch to `stylelint-config-standard` and handle `stylelint` issues, update `main.css` matching new rules - Update Eslint config, add new rule and handle issue - Convert lots of callbacks to async/await - Revise require imports (#3071 and #3072) ### Fixed - Fix wrong day labels in envcanada forecast (#2987) - Fix for missing default class name prefix for customEvents in calendar - Fix electron flashing white screen on startup (#1919) - Fix weathergov provider hourly forecast (#3008) - Fix message display with HTML code into alert module (#2828) - Fix typo in french translation - Yr wind direction is no longer inverted - Fix async node_helper stopping electron start (#2487) - The wind direction arrow now points in the direction the wind is flowing, not into the wind (#3019) - Fix precipitation css styles and rounding value - Fix wrong vertical alignment of calendar title column when wrapEvents is true (#3053) - Fix empty news feed stopping the reload forever - Fix e2e tests (failed after async changes) by running calendar and newsfeed tests last - Lint: Use template literals instead of string concatenation - Fix default alert module to render HTML for title and message - Fix Open-Meteo wind speed units
Please open a new issue if this is still a problem for you @looolz |
Platform: MM2 running on Raspberry Pi 4, Bullseye
Node Version: 16.19.0
MagicMirror² Version: 2.22.0
Description: When calendar events are long enough to wrap, the event name does not have the same vertical alignment as the icon and the time string.
Steps to Reproduce: Add an event with a long name and/or using relative time, enable icons for calendar events
Expected Results: Consistent vertical alignment between elements, regardless of whether that's top-aligned or centered.
Actual Results: Icon is top-aligned, event name is center-aligned.
Configuration:
Additional Notes: The second emoji that appears in the screenshot is part of the event name.
The text was updated successfully, but these errors were encountered: