Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

feat: Adding google calendar#1713

Closed
lancemccluskey wants to merge 44 commits intonodejs:mainfrom
lancemccluskey:adding-google-calendar
Closed

feat: Adding google calendar#1713
lancemccluskey wants to merge 44 commits intonodejs:mainfrom
lancemccluskey:adding-google-calendar

Conversation

@lancemccluskey
Copy link
Copy Markdown
Contributor

@lancemccluskey lancemccluskey commented Aug 11, 2021

Description

Adds calendar page to Nodejs.dev, similar to https://calendar.google.com/calendar/u/0/embed?src=nodejs.org_nr77ama8p7d7f9ajrpnu506c98@group.calendar.google.com

Related Issues

Addresses #883

Completed now, there will be follow-up worked defined in the task list for the above issue

@lancemccluskey lancemccluskey changed the title feat: Adding google calendar pckge feat: Adding google calendar Aug 11, 2021
@lancemccluskey
Copy link
Copy Markdown
Contributor Author

/preview

@github-actions
Copy link
Copy Markdown

Comment on lines +7 to +8
process.env.GATSBY_REACT_APP_GCAL_API_KEY ||
'AIzaSyCBklATFMNjWUjJVZswlTmoyZh27FbaHDQ';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do we typically do for api keys? Mines locked down so i dont mind showing it here

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

Alright, im pretty confused. I have no idea why its failing here, but everything passes locally. I tried creating a new branch bc I thought that might be it, commenting out the cache step in the test workflow, and even nuking node modules locally and installing with npm ci. Does anyone else know why its failing?

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

lancemccluskey commented Aug 12, 2021

After digging around, I think its failing because the commit I pushed before was cached so now itll keep failing even though I uninstalled @emotion/react. Does anyone know how to bust the cache? I found this, maybe we can create a secret for it to bust the cache? For now im gonna manually bust it

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

Guess not, alright im officially out of ideas

Copy link
Copy Markdown
Contributor

@rodion-arr rodion-arr left a comment

Choose a reason for hiding this comment

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

I could reproduce same issue with build locally so it's not related to CI cache.

I assume this is due to @emotion/react is actually a peerDependency of react-google-calendar

Locally you are probably using Current node version with npm 7 which installs peer deps. But CI uses node v14 and does not do this by default.

It looks like we need to add @emotion/react as dependency anyway :(

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

I could reproduce same issue with build locally so it's not related to CI cache.

I assume this is due to @emotion/react is actually a peerDependency of react-google-calendar

Locally you are probably using Current node version with npm 7 which installs peer deps. But CI uses node v14 and does not do this by default.

It looks like we need to add @emotion/react as dependency anyway :(

Ok ill add it back in and push it up. I thought it was weird I kept seeing emotion in my peer deps. Howd you know the npm version wasnt 7 in gh actions? I assumed if it was the same version I had locally it would be fine

@rodion-arr
Copy link
Copy Markdown
Contributor

rodion-arr commented Aug 13, 2021

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 13, 2021

Codecov Report

Merging #1713 (6475d1a) into main (41c7636) will decrease coverage by 11.86%.
The diff coverage is 15.43%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1713       +/-   ##
===========================================
- Coverage   90.77%   78.91%   -11.87%     
===========================================
  Files          80       83        +3     
  Lines         867     1029      +162     
  Branches      239      284       +45     
===========================================
+ Hits          787      812       +25     
- Misses         79      216      +137     
  Partials        1        1               
Impacted Files Coverage Δ
src/hooks/useGCalAPI.tsx 0.00% <0.00%> (ø)
src/util/gcalUtils.ts 0.00% <0.00%> (ø)
src/pages/calendar.tsx 54.34% <54.34%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41c7636...6475d1a. Read the comment docs.

Copy link
Copy Markdown
Member

@benhalverson benhalverson left a comment

Choose a reason for hiding this comment

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

Not ready yet.

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

/preview

@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@joesepi joesepi left a comment

Choose a reason for hiding this comment

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

These are visual nits but I think would be good to have:

  • add a little padding to the day boxes so that the text isn't so close to the borders of each day.
  • bump up the event title font one or two notches.
  • bump up the "title" font (August 2021 in month view for example) to be a bit bigger and perhaps bold.
  • Also: I just noticed that on Google Cal proper, the time is bold. That might also be a nice touch.

Otherwise, LGTM!!!!

@manishprivet
Copy link
Copy Markdown
Member

There are still some minor contrast issues in a dark mode that might be a blocker

image

image
image

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

I agree with the nitpicks you mentioned @joesepi and @manishprivet . I was thinking that work could be done in a separate PR though. I imagined this would be a "phase 1" of sorts, and we could iterate upon it. Especially considering how big this Pr is getting.

@joesepi
Copy link
Copy Markdown
Member

joesepi commented Sep 1, 2021

I agree with the nitpicks you mentioned @joesepi and @manishprivet . I was thinking that work could be done in a separate PR though. I imagined this would be a "phase 1" of sorts, and we could iterate upon it. Especially considering how big this Pr is getting.

Normally, I prefer smaller PRs but this is a big endeavor. I think that if you can address these remaining nits, it would be good to land them in this PR, in my opinion. Thanks!

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

@joesepi @manishprivet I made most of the requested changes detailed below:

  • Contrast issue addressed by using color scheme the side nav uses in the learn section
  • Increased font size for events on month view
  • Increased calendar "title" font size and weight
  • Added padding to events in month view so they arent so close to the edges
  • (Side Note): Removed hardcoded values from calendar.scss and replaced with variables from tokens.scss

The only thing I wasnt able to add was making the time bold in the event label for the month view. The reason is because the titleAccessor function react-big-calendar accepts wants a string returned, not html. We can provide a custom component to the event as described here but I really think that should be a separate ticket.

@lancemccluskey lancemccluskey added the create-preview Generate preview on staging.nodejs.dev label Sep 2, 2021
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Sep 2, 2021
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 2, 2021

@manishprivet
Copy link
Copy Markdown
Member

manishprivet commented Sep 4, 2021

@lancemccluskey The contrast issue still doesn't seem to be fixed here

I was talking about the selected entry in calendar

image

@lancemccluskey lancemccluskey added the create-preview Generate preview on staging.nodejs.dev label Sep 4, 2021
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Sep 4, 2021
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 4, 2021

@lancemccluskey
Copy link
Copy Markdown
Contributor Author

@manishprivet What about this? I messed around with the background, but it was hard to find a brand color that looked good on dark and light mode so I went with just changing the font color. I think its more pleasing to the eye and easier to read than before.

Screen Shot 2021-09-04 at 2 34 23 PM

@designMoreWeb
Copy link
Copy Markdown
Contributor

That looks much better

@manishprivet
Copy link
Copy Markdown
Member

manishprivet commented Sep 6, 2021

This looks a lot better @lancemccluskey

image
image

Can we do something similar here?

@lancemccluskey lancemccluskey added the create-preview Generate preview on staging.nodejs.dev label Sep 6, 2021
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Sep 6, 2021
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 6, 2021

@ovflowd ovflowd mentioned this pull request Jul 29, 2022
@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Jul 29, 2022

I'm closing this PR as it is stale, and this PR is actively being worked on.

@ovflowd ovflowd closed this Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

wr-agenda Website Redesign Meeting Agenda Label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants