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

Quicclinks page, ready to go! (Also fixed sidebar bug) #50

Merged
merged 8 commits into from
Oct 30, 2020
Merged

Conversation

acchiang
Copy link
Contributor

@acchiang acchiang commented Oct 29, 2020

Screen Shot 2020-10-28 at 11 34 59 PM
Screen Shot 2020-10-28 at 11 35 06 PM
Screen Shot 2020-10-28 at 11 35 12 PM

Edit: removed comment about dummy links data since they're not needed anymore :)

@acchiang acchiang requested review from ianmah and jackyzha0 October 29, 2020 06:43
@acchiang acchiang self-assigned this Oct 29, 2020
@acchiang acchiang added enhancement New feature or request Hecctoberfest labels Oct 29, 2020
@acchiang acchiang linked an issue Oct 29, 2020 that may be closed by this pull request
@jackyzha0
Copy link
Contributor

Do you mind quickly fixing #44 too?

@acchiang
Copy link
Contributor Author

@jackyzha0 ya i was just about to jump on that rn ;) you want it on this PR?


return (
<>
{createQuicklinksBlocks(categories)}
Copy link
Contributor

Choose a reason for hiding this comment

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

might be good to just inline this function, don't see the benefit of just pulling it out if it just renders the component

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oop good catch, I didn't notice!

@@ -71,19 +71,42 @@ export const QuickLinks = () => {
})
.then(links => {
//TODO: Group links into categories
console.log(links)
setLinks(links)
const dummyLinks = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this looks good! Don't forget to make a PR for this on https://github.com/nwplus/database-schemas/ to update the quick link schema.

After that's done, we can transition this to pull the data from Firebase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, good reminder, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohp I think the schema was already good! I've removed the dummy links now that we know the schema will work with the code 👍
image

@jackyzha0
Copy link
Contributor

@jackyzha0 ya i was just about to jump on that rn ;) you want it on this PR?

yeah, it should be pretty small so feel free to include it here

@acchiang
Copy link
Contributor Author

@jackyzha0 FYI i fixed #44 by overriding borders (ie removing them) from the styled A in the sidebar instead of directly at Typography.js because most A links should still keep the border underline :))) lmk if you want it differently!

@acchiang acchiang requested a review from jackyzha0 October 29, 2020 07:19
@acchiang acchiang changed the title Quicclinks page, ready to go! Quicclinks page, ready to go! (Also fixed sidebar bug) Oct 29, 2020
@acchiang acchiang linked an issue Oct 29, 2020 that may be closed by this pull request
Comment on lines 62 to 63
flex-basis: 100%;
flex: 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
flex-basis: 100%;
flex: 1;
flex: 1 100%;

ehehhH https://developer.mozilla.org/en-US/docs/Web/CSS/flex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mmm this doesn't work for some reason, i think it's because when flex takes 2 variables it doesn't treat the second one as flex-basis
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't want this, right?
image

Copy link
Contributor

@ianmah ianmah Oct 29, 2020

Choose a reason for hiding this comment

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

Oh, maybe flex basis 100% is getting overwritten by the shorthand right after it? (Can we remove it?)

When omitted from the flex shorthand, its specified value is the length zero

https://css-tricks.com/almanac/properties/f/flex-basis/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done! it just says flex: 1 now

<H2>{title}</H2>
<UL>
{
links.map((link) =>
<LI><A href={link.href}>{link.label}</A></LI>
// TODO: "key" prop must be unique, else error in console (nbd imo? -AC)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hopefully link.label is unique for each link, I think we can remove this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay sounds good! i added this bc there's no guard anywhere for unique hrefs but i'm sure it'll be fine in practice ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

Were you getting console warnings/errors ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh i got console errors with the dummy links because there were two google.coms but not anymore since we'll be using links from firebase from now on

@acchiang acchiang requested a review from ianmah October 29, 2020 21:48
jackyzha0
jackyzha0 previously approved these changes Oct 30, 2020
Copy link
Contributor

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

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

lgtm

@acchiang
Copy link
Contributor Author

lmAO @jackyzha0 SORRY - one more time ples

@acchiang acchiang requested a review from jackyzha0 October 30, 2020 02:03
Copy link
Contributor

@ianmah ianmah left a comment

Choose a reason for hiding this comment

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

🚢

Copy link
Contributor

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

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

😂 lgtm (x2)

@acchiang
Copy link
Contributor Author

thamk u all

@acchiang acchiang merged commit fdb57f5 into master Oct 30, 2020
@acchiang acchiang deleted the quicclinks branch October 30, 2020 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hecctoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove underlines in navbar Quicklinks Page
3 participants