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

Refactored caching logic for individual blog posts #515

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

EthanThatOneKid
Copy link
Owner

This PR slightly improves the caching technique for individual blog post JSON endpoints which are used by individual blog post pages.

Note: This may change in the fix for #502.

This code caused errors which I was able to refactor at a second glance. The specific technique for caching is expected to change soon, though. To resolve #502, that is.
@EthanThatOneKid EthanThatOneKid added the bugfix A PR that fixes a bug label Aug 29, 2022
@vercel
Copy link

vercel bot commented Aug 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
acm-csuf-site ✅ Ready (Inspect) Visit Preview Aug 29, 2022 at 10:01AM (UTC)

@EthanThatOneKid EthanThatOneKid enabled auto-merge (squash) August 29, 2022 10:01
Copy link
Collaborator

@karnikaavelumani karnikaavelumani left a comment

Choose a reason for hiding this comment

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

LGTM

@EthanThatOneKid EthanThatOneKid merged commit 9df87d0 into main Aug 29, 2022
jaasonw added a commit that referenced this pull request Sep 1, 2022
jaasonw added a commit that referenced this pull request Sep 1, 2022
EthanThatOneKid added a commit that referenced this pull request Sep 1, 2022
NLTN added a commit that referenced this pull request Sep 1, 2022
* Added Filter by Tag feature

* Added TagField component

* Updated TagField on:change event  & Fixed minor bugs

* Updated TagField + Added discernTags() + Modified fetchNewsletters()

TagField can work with Javascript disabled.

* Optimized discernTags()

* Update src/lib/components/utils/acm-tagfield.svelte

Great suggestion. Much cleaner code & avoid bugs.

Co-authored-by: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com>

* Update src/routes/blog/index.xml.ts

OMG. Deconstructor syntax is so helpful.

Co-authored-by: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com>

* Fix bugs and improved code quality.

* Created a unit test for discernTags() function

* Added Svelte Slot component to TagField component

* Code refactoring. Change the word "Tag" with "Label".

* Optimized filterPosts()

* Changed slot name.

* Update src/lib/components/utils/acm-labelfield.svelte

Co-authored-by: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com>

* Update src/routes/blog/index.svelte

Co-authored-by: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com>

* Remove unnecessary code

* Update src/routes/blog/index.json.ts

Co-authored-by: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com>

* Fixed lint errors

* Hide LabelField if there is no posts

* Fixed a mistake made when merging conflicts

Somehow, I managed to empty out the contents of `/src/lib/common/utils.ts`. I put them back, merged.

* Added support for the "no posts" UI state.

* Removed unused import to pass the tests!

* Refactored `fetchNewsletters` to handle DEBUG mode logic

* Made blog page to work with/without Javascript.

* Revert "Revert "Refactored caching logic for individual blog posts (#515)" (#524)"

This reverts commit 7db1f3b.

* Fixed typo in blog page title

[4:48 PM]jasonw: i forgot to put post but
[4:48 PM]jasonw: change blog back to readme

Co-authored-by: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com>
@jaasonw jaasonw deleted the fix/rnd-err-01 branch September 7, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix A PR that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants