chaynhq / bloom-frontend Goto Github PK
View Code? Open in Web Editor NEWCode for the for the frontend of the Bloom service.
Home Page: https://bloom.chayn.co/
License: MIT License
Code for the for the frontend of the Bloom service.
Home Page: https://bloom.chayn.co/
License: MIT License
All our testing is currently in english and we want to ensure our other site languages are working. This need came from an incident where a bug happened on all browser languages except for english and the cypress tests did not catch it.
We would like to know how much of our code is covered by Cypress tests. We don't need this to be part of the CI flow but to run with a command locally. Ideally we would run yarn cypress:cov
and we would receive a stat for how much code our E2E tests cover.
Recently, Bloom's frontend deployments were updated from from Heroku to Vercel.
Additionally, we determined new standards for keeping out git flow organized: (#720). Those standards being: 1) develop is staying our default branch 2) maintainers must only merge commits from develop to main, never squash or rebase, to keep the main's git history identical to develop.
These recent changes need updated in several areas of Bloom's docs:
NextJS Apps is the upgraded version of NextJS Pages. We should leverage the additional features and benefits by upgrading Bloom's frontend to NextJS Apps.
Benefits of NextJS Apps include but not limited to: enhanced scalability from improved modular approaches, advanced routing capabilities, improved performance in server-side rendering and static site generation, built-in optimizations for high traffic.
Note: Please document the changes to be made with the upgrades. If there are many or highly complex changes, we will open new issues for them.
We should upgrade to Node 20. Node 17 is no longer supported, and Node 18 is required to fully leverage NextJS. There will likely be dependency issues as part of this change, so it will require a bit of time.
package.json
/workflows
directory.README
documentation.We have recently created a /docs
directory in this repo to store technical documentation separate from the README.md and we need to link contributors to this directory in the README.md
, similar to how Soulmedicine is organized.
README.md
:/docs
directory, which would be: https://github.com/chaynHQ/bloom-frontend/tree/develop/docs (This is where a README.md file will be located in the near future.)Please disregard failing tests as we are currently upgrading their performance. Thank you!
Resources:
All our testing is currently in english and we want to ensure our other site languages are working. This need came from an incident where a bug happened on all browser languages except for english and the cypress tests did not catch it.
While NextJS 13 will be supported for the forseeable future, we should consider upgrading to NextJS 14 to leverage NextJS's newest features and 14's stronger support for bug fixes and security patches.
We need to link to the CONTRIBUTING.md file in the README.md so contributors can more easily see the contributing guidelines.
README.md
, add the following:We should simplify our README by separating the key concepts and architecture guides into their own separate /docs directory, similar to how Soulmedicine is organized, and turn the README into a brief overview of the project and quick start guide.
/docs
folder in the root directory.README.md
and before the Cypress section into the /docs
folder in a file called key-concepts.md
We migrated Firebase up to version 9 but we are still using the /compat/ version which is compatible with Version 8. We would like to be using Version 9.
To get started, read through this document to get more information on how Cypress is used in Bloom.
Once you feel comfortable with Cypress and have created an example e2e test as outlined in the Cypress guides, please ping the team to get more information on how to write this ticket :)
A duplicate of this issue - https://github.com/chaynHQ/ysm/issues/228 but with special attention to Cypress environment variables.
Currently these tests cannot be ran by contributors. We need to update the documentation to reflect this and note of potential new issues to increase e2e test coverage.
We need to create PR templates to guide contributors through submitting pull requests on Bloom
Additionally this helps fulfill Community Standards for this repo.
Dependabot pull requests are automatically created. Our cypress tests don't currently run against code on the branch so we need to run them manually for now. An automated way of doing this is in the pipeline. However, for now we need to run the tests manually
We need more descriptive labels for issues and pull requests to help organize our progress.
As internally discussed, we experienced anomalies with our current git flow, resulting in an out-of-sync main branch. We determined the cause to be squashing commits into main, resulting in main being out of sync with develop. Additionally, there are reported anomalies with having a default branch other than main, as well as contributors commonly mistaking main to be the default branch.
This issue was created retroactively.
Git Flow Highlights:
Ensure that the develop
branch being "the source of truth" instead of main
is thoroughly explained and re-iterated throughout our docs.
Contributor Flow: fork, clone, pull request feature-branch
-> develop
Maintainer Flow:
feature-branch
-> develop
: squash and merge, squash > rebase to enforce linear git history.develop
into main
: only merge commits, never squash or rebase to help keep both branches in sync.Chayn Staff: forking not always necessary. Recommended to delete old feature branches to avoid re-using the same feature branch name.
Dependabot pull request are automatically created. Our cypress tests don't currently run against code on the branch so we need to run them manually for now. An automated way of doing this is in the pipeline. However, for now we need to run the tests manually
Background
We installed next-pwa a few months back so that our site could be a progressive web app. However, we haven't worked on it since then and are unlikely to in the near future. At the moment it is broken which means it is causing a lot of noise in our logs and is causing software bloat so we would like to remove it.
Task
As a logged-in user, when I navigate to the login page (e.g. through a bookmark or a link in an email), I am redirected to a different page e.g. the courses page.
This makes it clear to me that I am logged in.
We need to give instructions to search engines and crawlers about where they can/ should go through a robot.txt file.
For now these are the Disallowed urls
Please disregard failing tests as we are updating their performance. Thank you!
Describe the bug
Our custom 404 pages are not working on the dev server but they do seem to work if you build the app. This only happened after the upgrade to nextjs 13.5.4
To Reproduce
Steps to reproduce the behavior:
yarn dev
.yarn build
yarn start
Expected behavior
On the dev server, we should be able to see the custom 404 page.
Screenshots
Nextjs Default
Custom 404
Desktop (please complete the following information):
Dependabot pull requests are automatically created. Our cypress tests don't currently run against code on the branch so we need to run them manually for now. An automated way of doing this is in the pipeline. However, for now we need to run the tests manually
Dependabot has already raised a PR for this.
Please also read through this part of the volunteer wiki to get more information on how to complete dependency upgrade issues.
Approach
Please note that this ticket is blocked by this backend ticket
When a user is logged in they can apply a code on this form on /account/apply-a-code. However, if they accidentally apply the code twice, they get this unhelpful error message.
This is not the best and doesn't let the user know that they have already applied the code and don't need to do anything else.
The solution is:
Implement a GitHub Action that will automatically welcome new contributors in PRs.
https://github.com/marketplace/actions/auto-message-for-pr-s-and-issues
https://github.com/actions/first-interaction
https://github.com/marketplace/actions/first-interaction
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment
Remove .github/manual-deploy-staging and .github/manual-deploy-prod workflows. Both of these workflows do not work so there is no point them cluttering our repo.
.github/workflows/manual-deploy-staging.yml
and .github/workflows/manual-deploy-prod.yml
All our testing is currently in english and we want to ensure our other site languages are working. This need came from an incident where a bug happened on all browser languages except for english and the cypress tests did not catch it.
Background
Github actions will no longer support node 12 soon. We are trying to upgrade all our applications to node 16 or higher.
Task
We need to create a CONTRIBUTING.md
file to guide developers contributing to Bloom.
Additionally this helps fulfill Community Standards for this repo.
CONTRIBUTING.md
and open a PR.Currently, our README links interested volunteers directly to the volunteer form, not to our volunteer info page (which contains the form). We need the README to link to the Getting Involved volunteer info page instead, similar to how our CONTRIBUTING.md file does.
README.md
under the Getting Involved section:Please disregard failing tests as we are updating their performance. Thank you!
As a Bloom user, I want to know when Bloom is down for maintenance.
Currently if we have a period of down time on Bloom backend we don’t have any mechanism to inform our users. They just have a poor user experience and see errors.
As a Bloom user, I want to know when Bloom is currently not usable and when it will be back.
Our README documentation is a little out of date and could be more simplified and organized. We could simplify our README by separating the key concepts and architecture guides into their own separate /docs directory, similar to how Soulmedicine is organized, and turn the README into a brief overview of the project and quick start guide.
Enable Super Admin users to update the status of Partner Admin users from active to inactive. This will happen on the /admin/dashboard
page.
Initial State on page load
Once the user email is selected
Once the request has been successful
Please note this ticket is dependent on this ticket in the backend to be completed.
Create a security policy to guide contributors through reporting a security vulnerability on Bloom.
Additionally this helps fulfill Community Standards for this repo.
We would like to upgrade Bloom-frontend to Node 17 as a step to the latest. There is likely to be dependency issues as part of this change so it will require a bit of time.
All our testing is currently in english and we want to ensure our other site languages are working. This need came from an incident where a bug happened on all browser languages except for english and the cypress tests did not catch it.
Implement a GitHub Action that automatically unassigns contributors from an issue after days of inactivity.
Starting out, we will do 3 months of inactivity, but will adjust as needed.
https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization
https://docs.github.com/en/actions/managing-issues-and-pull-requests/using-github-actions-for-project-management
https://github.com/marketplace/actions/unassign-contributor-after-days-of-inactivity
https://github.com/actions/stale
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
We need to audit the contributor flow, specifically the process of how environment variables are obtained, to make certain that the process is seamless, secure, and free from setbacks. This ensures external contributors can have the confidence they need to make impactful contributions.
README
for retrieving your own environment variables after they were removed in the latest Vercel upgrade PR.README
from a Chayn insider perspective, while making note of any errors encountered in the process and documentation.README
from an outside contributors perspective, while making note of any errors encountered in the process and documentation.README
to a Notion doc where safe, secure env vars are provided (with limited privilege, are monitored and routinely changed, and with no connection to production).All our testing is currently in english and we want to ensure our other site languages are working. This need came from an incident where a bug happened on all browser languages except for english and the cypress tests did not catch it.
Describe the bug
The Bloom CI pipeline on the Readme is broken.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should see the "passing" badge as expected on github Repositories.
Additional context
Check Dependabot pull request does not break the site.
Storyblok tokens cannot be created by outside contributors because they must contain Bloom content to be accurate. Given the Storyblok token is required, this blocks contributors. We have already created a Storyblok token for contributors here: #611. Now we must determine how we're going to share this with contributors.
README
docs with the Storyblok token.Currently the /courses routes are hidden behind a login page, which will prevent some web crawlers to access and index it. I am proposing some alternatives to allow some of this content to be accessed by web crawlers for better SEO and would love dev feedback on the best way forward
While working on issue #610 , I noticed that /courses is protected behind a login page. I added some code to dynamically add /courses routes to the sitemap for the project which would help in better SEO for the website.
On @kyleecodes 's recommendation, I am opening this issue for gathering dev feedback on the best way forward. Here are some ideas/alternatives I proposed in my original comment while talking with Kylee.
So currently I have static routes manually entered in the sitemap and some code for representing the dynamic routes under /courses. As the /courses routes are being login access, web crawlers cannot access them UNLESS the web crawlers use some specialized package/code to use login credentials and view /courses. Here we have two options:
If you want the /courses routes to not be accessible to web crawlers, I can add them to the disallow list in robots.txt!
If you do want the /courses routes to be accessible to web crawlers, I can figure out how to get dynamic route paths from getStaticProps and replace my current code for adding these routes to the sitemap. From my understanding, if I implement this correctly, everytime a new course is added, the sitemap would automatically be updated with the route for that course withoute needing manual editing of the sitemap.
Alternatively, if you would like the /course route to be protected from web crawlers yet still have some data on courses available for SEO, I can create a new route for just displaying some course info on the frontend. That way you can choose what gets displayed and this route will be a static route that doesn't need to be updated, nor is it behind login access. This route would be like a sneak peek or a welcome brochure to the courses without showing everything in them if that makes sense? Just something for the web crawlers to look at and know what the website's about and what it's offering.
I would love to get some feedback on whether or not to disallow /courses from robots.txt, add it to the sitemap or to create a small courses page which will display info on the courses so web crawlers can index it. I am not privy to the contents of these courses so I can not make the call whether they should be hidden from web crawlers or not.
Check Dependabot pull request does not break the site.
Describe the bug
When you are logged in and on the home page, you get an error in the console.
next-dev.js:20 MUI: The `value` provided to the Tabs component is invalid.
None of the Tabs' children match with "-1".
You can provide one of the following values: 0, 1, 2, 3, 4.
This comes from the SecondaryNav component. When we are on the home page, we are not in any of the tabs and the value is set as -1. -1 is not an index in the tabs.
To Reproduce
Expected behavior
We have no error in the console. Ideally we would not set a value at all. If you look at these [docs](https://mui.com/material-ui/api/tabs/) - it looks like you can set the value to false and it will select nothing and we won’t get the error.
Desktop (please complete the following information):
All OS and Browsers
Describe the bug
Console Error for MUI tabs. Doesn't affect functionality but best to clean up the console.
To Reproduce
Steps to reproduce the behavior:
The error in the console shows
next-dev.js:20 MUI: The
value
provided to the Tabs component is invalid.
None of the Tabs' children match with "-1".
You can provide one of the following values: 0, 1, 2, 3, 4.
Expected behavior
We have no error in the console. Ideally we would not set a value at all. If you look at these [docs](https://mui.com/material-ui/api/tabs/) - it looks like you can set the value to false and it will select nothing and we won’t get the error.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
This comes from the SecondaryNav component. When we are on the home page, we are not in any of the tabs and the value is set as -1.
We have a test that checks whether a user is sent to the partner admin dashboard on load if they have partner admin authentication - see partner-admin.cy.tsx. However, we don't check whether they successfully can make an access code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.