Skip to content
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

Feature/agenda-module-aesthetic-changes #325

Merged
merged 8 commits into from
Mar 15, 2024

Conversation

emilyboda
Copy link
Contributor

@emilyboda emilyboda commented Mar 15, 2024

  1. Moves the time and event titles further to the left, to allow more space for event titles.
  • Events often have long titles that get cut off, especially if users increase font size
  1. Right aligns the time
  • I feel like it looks better aesthetically to have the end of the time and the beginning of the event be right next to each other.
  • I also added a space before the dot to match the space after
  1. Added "all day" to replace a missing time marker
  • this may need to be translated, but I'm not sure how to do that. is there a better way to do it than just make a list of the words "all day" in every language? maybe the date module already has this built in?

Aesthetic changes look like this:
https://photos.app.goo.gl/Ti9gbmB6kwJw7Gj6A

@emilyboda emilyboda closed this Mar 15, 2024
@emilyboda
Copy link
Contributor Author

apologies, i made the PR too early. still refining the code. will reopen later

@emilyboda
Copy link
Contributor Author

Ok, updated the code

@emilyboda emilyboda reopened this Mar 15, 2024
@aceisace aceisace self-assigned this Mar 15, 2024
@aceisace
Copy link
Member

I like the changes! It looks more compact while the text is well-readable. Thank you for your PR @emilyboda . Let's just wait a little until the tests have passed before attempting to merge

Just pulling your image here so it can be seen even if the link expires or goes down:

@aceisace
Copy link
Member

Oh, the tests can't pass as the github secrets aren't configured in your repo. I'll manually run the unittests on my end with your changes

@aceisace
Copy link
Member

I tested your changes locally and it seems there is a small issue with the time-width. The time-width needs some buffer for the width to show "all day". Currently, it will show only "all da":
image
Setting time-width to:

time_width = int(max([self.font.getlength(
                events['begin'].format(self.time_format, locale=self.language))
                for events in upcoming_events]) + 10)

notice the + 10 pixel buffer as this solves this issue:
image

The red boxes are the boxes generated by the write-function, this time with a red background to better understand the positions.

Please modify the time_width accordingly and then this can be merged 😁

@emilyboda
Copy link
Contributor Author

Ok, I fixed it. Rather than adding the arbitrary 10, I added "all day" to the list of times that the program dynamically finds the max of. This should work for "all day" and also it will still work even if that string is changed to another language where the text is longer.

I also found one more unneeded buffer that I removed.

IMG_5897

@aceisace
Copy link
Member

I'm still getting the same issue, the y on the day is missing. For now, let's settle on the + 10. Later, this can be adjusted once a better version has been found

@emilyboda
Copy link
Contributor Author

strange... Ok I added the +10

@emilyboda
Copy link
Contributor Author

whoops... NOW i added the plus 10

@aceisace
Copy link
Member

Looks good, thank you very much for your effort in creating this PR and making the agenda more compact, while ensuring readability of the text! Way to go @emilyboda ! Merging this now 👍

@aceisace aceisace merged commit 6c79d4c into aceinnolab:main Mar 15, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants