zeeguu / web

Frontend for the zeeguu web application.
https://www.zeeguu.org
3 stars 5 forks source link

FEATURE: Added "For You" to the homepage. #371

Closed oskaitu closed 1 month ago

oskaitu commented 1 month ago

This feature adds the following things.

  1. Route for a "For you" button on the home page that displays recommended articles made through more-like-this ElasticSearch query.
  2. Added necessary API functionalities to get recommendations from zeeguu-api.

This pull request is combined with: https://github.com/zeeguu/api/pull/146

netlify[bot] commented 1 month ago

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
Latest commit 2eb071e3fb326036cf851d7c2139ddbef01628df
Latest deploy log https://app.netlify.com/sites/voluble-nougat-015dd1/deploys/6660299c7874fc0008709fe7
Deploy Preview https://deploy-preview-371--voluble-nougat-015dd1.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

mircealungu commented 1 month ago

The most embarrassing thing? It seems that I wrote that code too :) I guess in 2021 I was still learning React :)

Yes, please implement the changes, and I’ll try to fix the OwnArticles myself ASAP!

Tak for spotting this! On 30 May 2024 at 21.42 +0300, oskaitu @.***>, wrote:

@oskaitu commented on this pull request. In src/articles/RecommendedArticles.js:

+import LoadingAnimation from "../components/LoadingAnimation"; +import { setTitle } from "../assorted/setTitle"; +import strings from "../i18n/definitions"; + +import ArticlePreview from "./ArticlePreview"; + +import SortingButtons from "./SortingButtons"; + +import * as s from "../components/TopMessage.sc"; + +export default function OwnArticles({ api }) {

  • const [articleList, setArticleList] = useState(null);
  • let originalList = articleList;
  • if (articleList == null) { The code in RecommendedArticles is taken from OwnArticles, which is the one saved articles are stored in. I figured that it was quite a similar page, so I used the same implementation in the for you page. I can implement the changes that you proposed using the pattern from FindArticles, into RecommendedArticles. But just to let you know, that this problem will still persist in OwnArticles. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>