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

Feat: Calendar View #311

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Feat: Calendar View #311

wants to merge 13 commits into from

Conversation

SaraVieira
Copy link
Collaborator

Creates a calendar view for the timeline

closes #244

@SaraVieira SaraVieira requested a review from raae June 2, 2021 23:33
src/pages/timeline.js Outdated Show resolved Hide resolved
@SaraVieira
Copy link
Collaborator Author

Things done:

  • Insert calendar view with CSS Grid
  • Some layout creation
  • Route change when on calendar
  • New icons
  • New components

@raae
Copy link
Owner

raae commented Jun 4, 2021

Could the info about the current state be moved underneath the current' week's row?

screenshot

Browser metadata
Path:      /timeline/calendar/
Browser:   Chrome 90.0.4430.212 on Mac OS 10.13.6
Viewport:  1920 x 978 @2x
Language:  en-GB
Cookies:   Enabled

View on BrowserStack

Open Deploy Preview · Mark as Resolved

Copy link
Owner

@raae raae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is making me so happy! Feels like progress, actual new functionality.

src/pages/timeline.js Outdated Show resolved Hide resolved
const classes = useStyles()
const date = makeDate(entryId)

const redirectTo = path.includes("/calendar")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I think it could be good to do ".." as path for navigate. It will move back one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this, let me know if you still want this change

import { makeDate, entryIdFromDate } from "../utils/days"
import { AppLayout, AppMainToolbar, AppPage } from "../app"
import { Welcome } from "../onboarding"
import { selectDaysBetween } from "../cycle"
import TimelineItem from "./TimelineItem"
import DatePicker from "./DatePicker"
import Calendar from "./Calendar"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: I like this choice of moving between the views

return (
<AppLayout>
<AppPage>
<AppMainToolbar>
<DatePicker date={selectedDate} />
<IconButton
aria-label="Scroll to today"
onClick={() => navigate(`/timeline/${entryIdFromDate(new Date())}`)}
onClick={() =>
Copy link
Owner

@raae raae Jun 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: This seems to not work, it goes back to timeline view when clicked if on calendar

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :D

@raae
Copy link
Owner

raae commented Jun 4, 2021

thought: Should remove "add note" and make the whole square a button that will take you to a /<date> that then gives you a detailed view of the date and then from that page go to `//edit? As it will be hard to fit all the info in the square?

@olavea
Copy link
Collaborator

olavea commented Jun 4, 2021

😸 👍

@SaraVieira
Copy link
Collaborator Author

Could the info about the current state be moved underneath the current' week's row?

screenshot

Browser metadata
Open Deploy Preview · Mark as Resolved

This is actually super hard in CSS grid, to remove flow of elements :/

Trying it now

@SaraVieira
Copy link
Collaborator Author

Moved everything in the calendar to a new page :)

@raae raae changed the title Very early version of calendar view feat: Very early version of calendar view, closes #244 Jun 7, 2021
@raae
Copy link
Owner

raae commented Jun 7, 2021

Could the info about the current state be moved underneath the current' week's row?

This is actually super hard in CSS grid, to remove flow of elements :/

Trying it now

suggestion: The purple info block should be "connected" to current month/date not the next menses prediction (as it feels like it is now)

@troubalex
Copy link

Could the info about the current state be moved underneath the current' week's row?

This is actually super hard in CSS grid, to remove flow of elements :/

You might run into the so called visual moat issue, where users don't register the block of text at all regardless of where you place it. We're all so used to jumping over these kinds of elements. 😅

As an alternative, have you considered giving a visual indication of "day 1" on the calendar view instead? I tag my period days with 🩸 emojis.

(Also, hi @SaraVieira 👋 please ignore me until @raae says something else. We've been talking about the app for a while among ourselves 😅 )

@troubalex
Copy link

troubalex commented Jun 8, 2021

Could the info about the current state be moved underneath the current' week's row?

This is actually super hard in CSS grid, to remove flow of elements :/
Trying it now

suggestion: The purple info block should be "connected" to current month/date not the next menses prediction (as it feels like it is now)

Oh wait, now I get what you're trying here. Hum, that is going to be fiddly. 🤔 Apple Health solves this (very poorly) by giving you a month view per prediction (period and fertility here). Clue does visual indicators for different types of predictions.

You may have to keep the calendar to a minimum to avoid overloading it, and then maybe add another view that gives a better insight into what is going on over the course of a cycle and makes more detailed predictions?

@raae raae mentioned this pull request Jun 8, 2021
@raae
Copy link
Owner

raae commented Jun 8, 2021

suggestion: The purple info block should be "connected" to current month/date not the next menses prediction (as it feels like it is now)

Oh wait, now I get what you're trying here. Hum, that is going to be fiddly. 🤔 Apple Health solves this (very poorly) by giving you a month view per prediction (period and fertility here). Clue does visual indicators for different types of predictions.

You may have to keep the calendar to a minimum to avoid overloading it, and then maybe add another view that gives a better insight into what is going on over the course of a cycle and makes more detailed predictions?

suggestion: Now that I think of it, this "info" block could be skipped in the grid view as more dates will be visible. In the timeline view it's needed as otherwise you might have to scroll a lot to see the next period date.

Future plans @troubalex is to give the tags colors and then show as dots on the day, you open/press/click to see more of the info and then add emojii support #318

@SaraVieira SaraVieira changed the title feat: Very early version of calendar view, closes #244 Feat: Calendar Viw Jun 8, 2021
@SaraVieira SaraVieira changed the title Feat: Calendar Viw Feat: Calendar View Jun 8, 2021
@SaraVieira
Copy link
Collaborator Author

This makes sense, I will remove this info block from the calendar view and we should give more prominence to the first day, maybe a red background?

hello @troubalex 👋

@raae
Copy link
Owner

raae commented Jun 8, 2021

This makes sense, I will remove this info block from the calendar view and we should give more prominence to the first day, maybe a red background?

hello @troubalex 👋

I think I might fill in som data in those blocks in the near future, so maybe a red border?

@SaraVieira
Copy link
Collaborator Author

Sure! Will add that tomorrow morning and let you know when it's done :)

@SaraVieira
Copy link
Collaborator Author

SaraVieira commented Jun 9, 2021

@raae Border has been added and info removed 🚀

@raae raae self-requested a review June 9, 2021 19:23
Copy link
Owner

@raae raae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • suggestion: I would like the first column to be Monday (I will later add option to have Sunday)

  • suggestion: When clicking a day you go to /<date> and then there is an edit button that adds /edit to the path.

  • suggestion: In the grid item there could be a dot for each tag (will later be color coded)

  • suggestion: The /date could look kind of like a timeline item

Just make as much the functional stuff you have time for, and then I will polish it.

I am a little tired, so let me know if anything is unclear. Will look over it tomorrow morning.

@SaraVieira SaraVieira marked this pull request as ready for review June 15, 2021 12:58
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.

Make a calender view tab (in addition to timeline view)
4 participants