Open jonsnowpt opened 1 month ago
@Izobov
We have pushed directly to the DEV environment, but it is not working:
For example:
https://betarena-scores-platform.herokuapp.com/a/tag/atp
@Izobov
Corrections:
@Izobov
Implement Relative Time Utility: Create a utility function that takes a date and returns a string formatted as relative time if the date is less than 24 hours old, or returns the full date string otherwise.
Translation endpoint:
translation_author_publication_date
query MyQuery @cached {
translation_author_publication_date {
data
}
}
@Izobov
13.
15
16.
18.
19.
https://github.com/Betarena/scores/assets/37311649/1375cf19-76f2-437e-8ce9-ba85ce62074a
20.
21.
22.
@jonsnowpt
@jonsnowpt 17. Theres screenshoot from https://betarena-scores-platform.herokuapp.com/a/tag/atp. So html data exist
@Izobov
Its not working you need to add the H1, H2 and all the required HTML data requested on the task.
14.
24.
25.
26
https://github.com/Betarena/scores/assets/37311649/92c4c06b-0c90-4b0c-82ca-465dc6a34c51
28
29
30.
31.
https://betarena-scores-platform.herokuapp.com/a/tag/palpites
32.
@jonsnowpt @migbash 31 sorting by relevant date should be done on the backend side. Same reason, on fronted we recieve only 10 articles (that means that on front we can sort only 10 articles).
P.S. and maybe we need to pass userLanguage as a fallback. This will be for sorting, not filtering.
@Izobov
@Izobov
14.
Undefined on H1, missing H2 (Should be all articles titles)
32.
33.
34.
35.
@Izobov
For review:
40.
π Feature Request Description
We are introducing a new feature on our website - a dedicated section for tags that will display all articles associated with each tag. The objective is to enhance user engagement by providing a streamlined way to access articles by tags. This section will leverage data from our Redis cache for speed, with a fallback to load directly from Hasura if the cache is unavailable.
Requirements
Tag Page Content:
Display the Tag name and Tag Description.
List articles under each tag with the following details:
Follow Option:
Logged-in Users: If a user is logged in, provide the option to follow the tag. This action adds the tag to the
following
field undertags
in the user's profile in the Firestore Database.Example:
Guest Users: Guests are prompted to register or log in.
?authForm=true
Language and Sorting:
Articles are sorted by the most recent.
The data is loaded according to the default language specified in the userβs profile FIRESTORE DATABASE. Users can change the language using a dropdown option to either a specific language or load articles in all languages, prioritizing the default language.
Followers Count and Total Articles:
Display the number of users following the tag (this data is added to the
followers
table on Hasura) and the total number of associated articles. This data changes in real-time as users follow/unfollow tags using Hasura real-time:https://hasura.io/learn/graphql/intro-graphql/graphql-subscriptions/
SEO Details:
Load SEO details for each tag from the seo_details field in the Hasura tags table.
Themes:
Ensure the section supports both Light and Dark themes.
Data Endpoints
Hasura Production Endpoint (betarena_prod authors tags): Fields: name, description, seo_details Redis Cache: Use as the primary data source for faster content loading. Fallback to Hasura: In case data is not available in Redis.
Back option behaviours:
Step 1: Detect PWA or Browser Environment
First, you need to determine if the user is visiting from a PWA or a web browser. You can check if the site was launched from the home screen (PWA) or directly in the browser.
Step 2: Implement the Back Button Logic
Create a back button component that checks the environment. If the user is on a PWA, the button will take them to the last visited screen. If they're in a browser, it will redirect them to the homepage.
Step 3: Handle Edge Cases For the PWA scenario where the user might not have a history within your site (e.g., they opened the PWA directly to a specific page), ensure that window.history.back() does something sensible. You might need to check if going back is possible or provide a default fallback URL.
Step 4: Test Thoroughly
In Browser Testing: Ensure that the back button redirects to the homepage when accessed through a web browser. In PWA Testing: Confirm that the back button navigates to the last visited screen when accessed through the PWA. Test edge cases where the user might not have a navigation history.
π HTML SEO
The following content should be available on HTML to SEO purposes:
Tag name and Tag Description.
Articles content:
Implementation Notes
We're using SvelteKit as the frontend framework. Ensure compatibility with both Redis and Hasura for data fetching. Implement error handling for the fallback mechanism from Redis to Hasura.
Acceptance criteria:
Timeline Deadline for completion:
Please ensure all code is thoroughly tested and reviewed before submission. This feature is pivotal in enhancing our content discoverability and user engagement.
FIGMA:
https://www.figma.com/file/2hrUqV3U6a82pJYqGsAghH/Betarena?type=design&node-id=7184%3A48570&mode=design&t=5YEegxK8uyzwzdo4-1
β Further context and resources (cummulative)
No response