From 04392766274e8dd37856fb8a56d649ca048c7b48 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Fri, 27 Nov 2026 10:43:03 +0100 Subject: [PATCH] minor changes to readMe --- README.md | 4 ++++ docs/architecture.md | 2 +- docs/quality.md | 2 +- docs/tests.md | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 88e270b..a57c89a 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,16 @@ http://it2810-03.idi.ntnu.no/project2/ - **Explore Plants:** For users who already know what they are looking for. Instead of matching, they can search, filter and sort the whole catalogue directly. The view is kept in the URL, so it survives a refresh and can be shared as a link. +- **Plant cards:** Every plant is shown as a card with its picture, and chips for its watering, light and care level. The card can be flipped to read about the plant: its scientific name, its care needs and a description. + - **Plant Owner Test:** For users who do not know their preferences yet. A short test tells them what kind of plant owner they are, and suggests preferences for watering, light and care level based on the answers. The result also gives an avatar that can only be earned through the test, so the user can show their plant owner type as their profile picture. - **Walkthrough:** A short guide that opens on the first visit and explains what each page is for, so new users can get started without confusion. It can be reopened at any time with the ? button. - **Profile:** Lets the user make the app their own, with a name, description, avatar and plant preferences. The profile is also a starting point if the app is made more community-based later. +- **Language and theme:** The app can be used in Norwegian or English, and in light or dark mode. Both are chosen in the sidebar and remembered on the next visit. + ## Tech stack | Part | Technology | diff --git a/docs/architecture.md b/docs/architecture.md index 688601a..0775e73 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -234,7 +234,7 @@ The frontend is built with React and TypeScript (Vite). - **Walkthrough:** The guide for new users is in `components/walkthrough/`, and is made up of three parts: - **The steps are data:** `walkthroughSteps.ts` lists the steps in the same order as the sidebar, each with an `id`, a picture and, for steps about a page, its `route`. The texts are in the translation files, so a new step only needs one line in the list and a title and text in each language. - - **`App.tsx` decides when it is open:** on the first visit (until `walkthroughSeen` is set in `localStorage`), and from the ? button in the header, where `stepForPath()` starts it at the step for the current page. + - **`App.tsx` decides when it is open:** on the first visit (until `walkthroughSeen` is set in `localStorage`), and from the ? button in the header, where `stepForPath()` starts it at the step for the current page. On Plant Match, the start page, and on pages without a step, it starts at the welcome step. - **`Walkthrough.tsx` shows one step at a time** in a native `` opened with `showModal()`, so the browser handles focus, Escape and the grayed-out page behind (see [Accessibility](quality.md#accessibility)). It reuses `LanguageSwitcher`, so the language can be changed without leaving the walkthrough. - **Internationalisation:** Text is stored in translation files for Norwegian and English (i18next). The watering, sunlight and care values on the plant cards come from Perenual in English, so `plantTraits.ts` maps each known value to a translation key. Values it does not know are shown as they are, and the plant names and descriptions stay in English. `getPlantPreferences()` in the same file uses the same keys to find which preferences a plant matches, which the preference chips on the plant cards use. - **Shared types:** `Plant` and `User` are defined once in `types/`, together with the ids that are also checked in the backend: the preferences (`Preference.ts`) and the profile pictures (`ProfilePicture.ts`). The types are used by the GraphQL result types, hooks, pages and components. TypeScript then checks that every part of the frontend uses the same field names and types. If a field changes, the compiler points out every place that has to be updated, instead of the error first showing up in the browser. diff --git a/docs/quality.md b/docs/quality.md index ce04333..88b9468 100644 --- a/docs/quality.md +++ b/docs/quality.md @@ -47,7 +47,7 @@ GitHub Actions ([.github/workflows/ci.yml](../.github/workflows/ci.yml)) runs on User testing showed that new users did not get a clear overview of what the app is for and what they can do on each page. -Based on this, we added a walkthrough that gives a clear overview of the app and its purpose. It opens by itself on the first visit and explains each page in a short step with a "Go to" link to the page. It only opens by itself once, so it does not get in the way of users who come back. It can be opened again at any time with the ? button in the header, and then starts at the page the user is on, so it also works as help for the current page. The language can be changed inside the walkthrough, so users who do not read Norwegian can switch to English before reading on. +Based on this, we added a walkthrough that gives a clear overview of the app and its purpose. It opens by itself on the first visit and explains each page in a short step with a "Go to" link to the page. It only opens by itself once, so it does not get in the way of users who come back. It can be opened again at any time with the ? button in the header, and then starts at the page the user is on (on Plant Match, the start page, at the welcome step), so it also works as help for the current page. The language can be changed inside the walkthrough, so users who do not read Norwegian can switch to English before reading on. ## Accessibility diff --git a/docs/tests.md b/docs/tests.md index b313d45..1cb88e6 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -105,7 +105,7 @@ To watch an e2e test, open UI mode, run a test, and expand it to choose the desk Test coverage for the backend -The frontend coverage counts every source file in `frontend/src`, not only the files a test happens to import, so files without tests are shown with 0 % instead of being left out. Only the test files themselves, type declarations (`.d.ts`) and `main.tsx`, which only starts the app, are left out. Files that only contain TypeScript types (`types.ts` in the backend, and `Plant.ts` and `User.ts` in `types/` in the frontend) are also shown with 0 %, since types are removed when the code is compiled, so there is no code to run. +The frontend coverage counts every source file in `frontend/src`, not only the files a test happens to import, so files without tests are shown with 0 % instead of being left out. Only the test files themselves, type declarations (`.d.ts`) and `main.tsx`, which only starts the app, are left out. Files that only contain TypeScript types (`types.ts` in the backend, and `Plant.ts` and `User.ts` in `types/` in the frontend) are shown with 100 %, since types are removed when the code is compiled, so there is no code to run (0 of 0 statements). The coverage only counts the Vitest tests. Code that is only run by the end-to-end tests is shown as not covered, even when it is tested there.