OpenTree-Education / rhizone-lms

A learning management system focused on self-reflection.
https://rhi.zone
BSD 3-Clause Clear License
14 stars 7 forks source link

#450 Add truncation to the activity title in week view calendar #461

Closed veranika-karpava closed 1 year ago

veranika-karpava commented 1 year ago

Authored by: @veranika-karpava

Proposed changes

This pull request resolves #450 by:

Screenshot 2022-11-30 at 16 53 44

Checklist

seidior commented 1 year ago

It looks good so far; I'm really impressed that you were able to accomplish this with minimal unintended side effects and target just the activities in the Week view.

It also seems like your changes to switching which calendar view is being presented don't cause any problems with the calendar view switcher, which is good.

I only have two comments, neither of which relate to whether or not this PR should be "approved", but it might lead to some interesting discussion in standup tomorrow:

I wonder also if we should drop the font size of the calendar as a whole, which may address some (but not all, of course) of these issues. But that may be outside of the scope of this GitHub issue.

veranika-karpava commented 1 year ago

As for time ranges I can delete truncation and it looks good on screen size 1168px: Screenshot 2022-11-30 at 18 52 34 but doesn't look good on the smaller size: Screenshot 2022-11-30 at 18 54 38

Also I can change font-size for event: Screenshot 2022-11-30 at 19 14 08

I like idea to change font-size for week and month view.

daveytech commented 1 year ago

Great work on this issue and PR. Thank you for including the screenshots and quickly addressing Spencer's feedback. The smaller font size is great and we can discuss as a team in the morning more about Spencer's notes but looks great to me.

veranika-karpava commented 1 year ago

As for the activity truncation, I'm not sure that I can do it because I use text-overflow that doesn't work with no wrap value of white-space property. I've been doing quick research and didn't find anything like this.

I did something like that, but it didn't work correctly.

Screenshot 2022-11-30 at 22 08 18
SanazDn commented 1 year ago

Great job! You did great job but to remove extra space you can use height: auto and if you wanna have less code and leaner code you could find the specific class that you are working on it in the inspect of the browser and then put in index.css file and overwrite the class like: .rbc-event { height: auto !important; } in the index.css and in this way you have much less code, but you did amazing coding here.

veranika-karpava commented 1 year ago

@seidior thank you for your comments. Based on Spencer's comments and team's decision I updated the code.

Now it looks like that: Screenshot 2022-12-01 at 13 40 39