From 9d69e685fdb67259e8fe2cc860683722791750d8 Mon Sep 17 00:00:00 2001 From: Jason Park <93040528+JasonNotJson@users.noreply.github.com> Date: Sat, 7 Oct 2023 01:45:30 +0900 Subject: [PATCH 1/4] chore: getting rid of dirty code (#481) * fix(deps): update dependency @aws-amplify/auth to v4 (#352) Co-authored-by: Renovate Bot * Feature: Added Dark theme (#365) * Theme provider to Syllabus & context to containers * Add context on components in Syllabus which may require fix for dark mode * feat: replace @reach/router to react-router v6 * feat: update header for all apps * fix: reinstall react-router-dom v6 and history after rebase * feat: add new themes * fix: lock files * feat: install TailwindCSS on Campus * feat: install TailwindCSS on Syllabus * feat: change theme-toggle color according to current theme * fix: change locations of tailwind import; remove unused log * feat: dark theme on Timetable * Feat: Added new sidebar icons from material ui icons * Feat: Separated icons into different component * fix: added package json and pnpm lock updates * feat: pass isDark property to styled components * feat: dark theme on Syllabus (CourseItem not yet) * fix: wrap ThemeProvider on Nav; use new theme colors * fix: use className instead of passing theme as props * feat: dark theme on CourseInfo (not completed) * fix: Made theme types exportable * fix: created sidebar wrapper locally instead of bit * fix: Fixed styling of icon group button * feat: added user profile icon * feat: Added dark mode styling to other links * fix: moved browser router wrapper outside to fix navigation * fix: used const instead of let for navigation hook * fix: fixed import order * feat: CourseInfo dark mode * feat: Made title logo svg into a component * fix: made title logo text colour change when theme toggle * fix: fixed extra stylings when dark mode * fix: updated package versions and pnpm lock file * feat: update loading-spinner & solve background color flicker while loading page in dark mode * feat: added dark mode styling to about us pages * feat: added dark mode styling to extra pages * feat: dark theme to mobile bottom nav * feat: update header & loading-spinner & body tag background color * feat: added dark mode background * fix: fixed title logo on sidebar not changing colours when switching modes * fix: added tab colours when dark mode * fix: added dark mode colours to partner page text * feat: dark mode for Labs * fix: related courses width * feat: update spinner in Syllabus; dark mode for Campus * fix: timetable course item scrollable space height * feat: make timetable course item darker in dark mode * feat: install tailwind in feeds (not used yet) * feat: redirecting page styling * feat: update sign in modal * feat: updated header component and pnpm lock file accordingly * fix: updated colors and header dependencies * fix: eslint fixes for campus folder * feat: added dark mode styling to campus folder * fix: eslint fixes in syllabus folder * fix: updated dark mode styling * fix: updated dark mode syllabus * fix: updated dark mode styling root folder * fix: syllabus border & step arrow color * fix: fixed styling for social media icons in partners * fix: removed unused imports * fix: Or-button dark mode color * fix: remove FilterWarningsPlugin * fix: update lock files * fix: remove -y option * fix: update lock files * fix: update @aws-amplify/auth in syllabus * fix: update loading spinner in Feeds * fix: add theme prop to LoadingSpinner in Feeds Co-authored-by: YHhaoareyou * fix: clear search keywords when onclick related courses * Debug: mobile dark mode debug (#373) * feat: dark mode & new messages on welcome modal * fix: dark mode on sign in modal & user login icon * chore(deps): update dependency eslint-plugin-react to v7.29.4 (#361) Co-authored-by: Renovate Bot * chore(deps): update dependency ts-loader to v9.2.8 (#359) Co-authored-by: Renovate Bot * feat: remove unused dependencies (#377) * Feature/darktheme colors (#378) * feat: added quarterColors for both light and dark mode * feat: Added google analytics to theme changes * fix: fixed user profile icon to make it consistent * fix: code refactoring * fix: code refactoring in syllabus * feat: added dark semantic colors * fix: added colors based on numbers too * fix: added a todo comment * fix: fix semantic text colors dark mode * feat: update quarter switch colors & icons * feat: update timetable course items and color selector with new theme colors Co-authored-by: Nicholas Narmada * Feature: Timetable dark theme (#379) * feat: Dark mode for pro tips and colors selector popup in Timetable * feat: update theme colors dependency for all apps * feat: add the hovering effect to the member cards (#381) * feat: update the hovering effect for member cards * fix: remove unused libraries; fix html background color in dark mode; disable card's hyperlink * fix: makes the code shorter and neater * fix: syllabus pnpm lock file * fix: syllabus pnpm lock file Co-authored-by: YHhaoareyou * Migrate from Webpack to Vite (#382) * feat: vite tested by career folder * feat: replace systemjs import with dynamic import to import vite project * feat: ignore dynamic import problem caused by webpack * feat: Migrate Campus from Webpack to Vite * fix: restore career * feat: register vite app campus by single-spa-layout * feat: migrate Syllabus to vite (error unsolved) * fix: fix lockfile * fix: solve "exportStar not a function", "undefined global" and use Vite envvar * feat: migrate syllabus to vite (done) * remove webpack from all apps except root * feat: migrate root to vite * feat: remove webpack related scripts & solve import-map not supported problem in Safari * feat: import static assets; solve errors of custom props passed to dom * fix: run eslint fix * fix: build script & config * feat: build config & debug global var * fix: output asset files path * feat: disable css code split in build * fix: run eslint fix * feat: preload css from mf apps to root; replace react-s-alert with react-toastify * feat: configure public path & env var for each app * fix: run eslint fix * feat: service-worker * fix: eslint fix * update lock files * fix: missing package * fix: externalize styles from other mf app * fix: campus room badge styles Co-authored-by: AustinZhu * fix: env without using dotenv explicitly (#385) * fix: packages version * fix: change env var name * fix: remove systemjs package; add peer dependencies * fix: feeds domain on staging/prod * Feature: About Us page link from Home page & split Home from Root-config (#387) * fix: remove custom sw * feat: add link to aboutus page from home * fix: eslint * Feature/fix card padding (#388) * fix: fixing the responsive design for members card * fix: fixing the responsive design for members card * fix: font color, repeated className, figure tag * fix: install missing dependency: @aws-amplify/core * fix: remove course function * feat: alert translation * fix: eslint * feat: add workbox runtimeCaching config * Fix service worker to enable it to replace old one (#389) * fix: add cleanupOutdatedCaches option * use custom sw & force update * skipWaiting and claim before cleanupOutdatedCaches * add ts files to NetworkFirst cache * remove ts from cache * register sw on index.html * change sw from ts to js * test updates to trigger build * registerSW in index.html * remove unused code and comment of registering sw * update files to trigger build * feat: add a profile card component; add hover & click effect; add a closing tab on cards (#390) * feat: add a profile card component; add hover & click effect; add closing tab on cards * fix: rename profile card & prop; type for useState * fix: syllabus minor styling issues * Update README.md * Migrate from Webpack to Vite (#386) * fix(deps): update dependency @aws-amplify/auth to v4 (#352) Co-authored-by: Renovate Bot * Feature: Added Dark theme (#365) * Theme provider to Syllabus & context to containers * Add context on components in Syllabus which may require fix for dark mode * feat: replace @reach/router to react-router v6 * feat: update header for all apps * fix: reinstall react-router-dom v6 and history after rebase * feat: add new themes * fix: lock files * feat: install TailwindCSS on Campus * feat: install TailwindCSS on Syllabus * feat: change theme-toggle color according to current theme * fix: change locations of tailwind import; remove unused log * feat: dark theme on Timetable * Feat: Added new sidebar icons from material ui icons * Feat: Separated icons into different component * fix: added package json and pnpm lock updates * feat: pass isDark property to styled components * feat: dark theme on Syllabus (CourseItem not yet) * fix: wrap ThemeProvider on Nav; use new theme colors * fix: use className instead of passing theme as props * feat: dark theme on CourseInfo (not completed) * fix: Made theme types exportable * fix: created sidebar wrapper locally instead of bit * fix: Fixed styling of icon group button * feat: added user profile icon * feat: Added dark mode styling to other links * fix: moved browser router wrapper outside to fix navigation * fix: used const instead of let for navigation hook * fix: fixed import order * feat: CourseInfo dark mode * feat: Made title logo svg into a component * fix: made title logo text colour change when theme toggle * fix: fixed extra stylings when dark mode * fix: updated package versions and pnpm lock file * feat: update loading-spinner & solve background color flicker while loading page in dark mode * feat: added dark mode styling to about us pages * feat: added dark mode styling to extra pages * feat: dark theme to mobile bottom nav * feat: update header & loading-spinner & body tag background color * feat: added dark mode background * fix: fixed title logo on sidebar not changing colours when switching modes * fix: added tab colours when dark mode * fix: added dark mode colours to partner page text * feat: dark mode for Labs * fix: related courses width * feat: update spinner in Syllabus; dark mode for Campus * fix: timetable course item scrollable space height * feat: make timetable course item darker in dark mode * feat: install tailwind in feeds (not used yet) * feat: redirecting page styling * feat: update sign in modal * feat: updated header component and pnpm lock file accordingly * fix: updated colors and header dependencies * fix: eslint fixes for campus folder * feat: added dark mode styling to campus folder * fix: eslint fixes in syllabus folder * fix: updated dark mode styling * fix: updated dark mode syllabus * fix: updated dark mode styling root folder * fix: syllabus border & step arrow color * fix: fixed styling for social media icons in partners * fix: removed unused imports * fix: Or-button dark mode color * fix: remove FilterWarningsPlugin * fix: update lock files * fix: remove -y option * fix: update lock files * fix: update @aws-amplify/auth in syllabus * fix: update loading spinner in Feeds * fix: add theme prop to LoadingSpinner in Feeds Co-authored-by: YHhaoareyou * fix: clear search keywords when onclick related courses * Debug: mobile dark mode debug (#373) * feat: dark mode & new messages on welcome modal * fix: dark mode on sign in modal & user login icon * chore(deps): update dependency eslint-plugin-react to v7.29.4 (#361) Co-authored-by: Renovate Bot * chore(deps): update dependency ts-loader to v9.2.8 (#359) Co-authored-by: Renovate Bot * feat: remove unused dependencies (#377) * Feature/darktheme colors (#378) * feat: added quarterColors for both light and dark mode * feat: Added google analytics to theme changes * fix: fixed user profile icon to make it consistent * fix: code refactoring * fix: code refactoring in syllabus * feat: added dark semantic colors * fix: added colors based on numbers too * fix: added a todo comment * fix: fix semantic text colors dark mode * feat: update quarter switch colors & icons * feat: update timetable course items and color selector with new theme colors Co-authored-by: Nicholas Narmada * Feature: Timetable dark theme (#379) * feat: Dark mode for pro tips and colors selector popup in Timetable * feat: update theme colors dependency for all apps * feat: add the hovering effect to the member cards (#381) * feat: update the hovering effect for member cards * fix: remove unused libraries; fix html background color in dark mode; disable card's hyperlink * fix: makes the code shorter and neater * fix: syllabus pnpm lock file * fix: syllabus pnpm lock file Co-authored-by: YHhaoareyou * Migrate from Webpack to Vite (#382) * feat: vite tested by career folder * feat: replace systemjs import with dynamic import to import vite project * feat: ignore dynamic import problem caused by webpack * feat: Migrate Campus from Webpack to Vite * fix: restore career * feat: register vite app campus by single-spa-layout * feat: migrate Syllabus to vite (error unsolved) * fix: fix lockfile * fix: solve "exportStar not a function", "undefined global" and use Vite envvar * feat: migrate syllabus to vite (done) * remove webpack from all apps except root * feat: migrate root to vite * feat: remove webpack related scripts & solve import-map not supported problem in Safari * feat: import static assets; solve errors of custom props passed to dom * fix: run eslint fix * fix: build script & config * feat: build config & debug global var * fix: output asset files path * feat: disable css code split in build * fix: run eslint fix * feat: preload css from mf apps to root; replace react-s-alert with react-toastify * feat: configure public path & env var for each app * fix: run eslint fix * feat: service-worker * fix: eslint fix * update lock files * fix: missing package * fix: externalize styles from other mf app * fix: campus room badge styles Co-authored-by: AustinZhu * fix: env without using dotenv explicitly (#385) * fix: packages version * fix: change env var name * fix: remove systemjs package; add peer dependencies * fix: feeds domain on staging/prod * Feature: About Us page link from Home page & split Home from Root-config (#387) * fix: remove custom sw * feat: add link to aboutus page from home * fix: eslint * Feature/fix card padding (#388) * fix: fixing the responsive design for members card * fix: fixing the responsive design for members card * fix: font color, repeated className, figure tag * fix: install missing dependency: @aws-amplify/core * fix: remove course function * feat: alert translation * fix: eslint * feat: add workbox runtimeCaching config * Fix service worker to enable it to replace old one (#389) * fix: add cleanupOutdatedCaches option * use custom sw & force update * skipWaiting and claim before cleanupOutdatedCaches * add ts files to NetworkFirst cache * remove ts from cache * register sw on index.html * change sw from ts to js * test updates to trigger build * registerSW in index.html * remove unused code and comment of registering sw * update files to trigger build * feat: add a profile card component; add hover & click effect; add a closing tab on cards (#390) * feat: add a profile card component; add hover & click effect; add closing tab on cards * fix: rename profile card & prop; type for useState * fix: syllabus minor styling issues * Update README.md Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot Co-authored-by: Nicholas Narmada <36405403+nichnarmada@users.noreply.github.com> Co-authored-by: Nicholas Narmada Co-authored-by: Xinyue Tao <96937379+xinyue296@users.noreply.github.com> Co-authored-by: AustinZhu * add script-src-elem to Content Security Policy (#391) * Hotfix (#392) * add script-src-elem to Content Security Policy * fix csp * Hotfix (#393) * add script-src-elem to Content Security Policy * fix csp * add blob:https: to csp * fix blob in csp * fix: remove csp * fix: remove all webpack-related packages & setting * Allow all in CSP * Fix: preload style, csp allow all, refactor index html & env var (#404) * fix style prelload link * refactor index.html & add env variables * remove slash from the end of base path env var * import other mf's css files as external * run eslint fix * run eslint fix * Update README.md (#397) Github -> GitHub * chore(deps): update dependency esbuild to v0.14.43 (#384) Co-authored-by: Renovate Bot * chore(deps): update dependencies * chore(deps): update dependencies * chore(deps): update dependencies * fix: preload & enable styles from other mf app * fix: packages version (fix React to v17) * Language filter for Feeds (#409) * filter feeds by language * feat: styling lang filter button * feat: Back button to Feeds list page * Remove using @apply in css file due to amp style problem * feat: added turbo-repo woooo (#420) * update feeds * update feeds * refactor: refactored project structure * feat: added turborepo * feat: eslint custom config dependency * fix: fix lint script * fix: removed self dependent dependencies * chore: pnpm lock updates * fix: remove dont purge tailwind from script * feat: add turbo scripts to monorepo * fix: fixed folder paths for github actions * fix: fixed campus pnpm-lock file * fix: updated pnpm lock again * fix: updated types for feed info * fix: feeds submodule & root env & campus type mismatch Co-authored-by: YHhaoareyou * feat: adding web hooks for forums * feat: updating meet our team page (#426) * feat: editing meet our team page * feat: adding michael to the MeetOurMembers page * feat: edited my position * feat: changing Jason's role to cheerleader * fix: downgrade pnpm version for test * feat: adding gunjan and aditya to the team * fix: fixing aditya image * feat: adding pam to the team * fix:fixing pnpm lock issues --------- Co-authored-by: YHhaoareyou * Export Bit components to turborepo packages (#428) * feat: created ui package * feat: added tailwind and prettier * chore: file linting * refactor: removed unnecessary files * refactor: configured build * feature: add storybook * feat: import all bit components * refactor: remove unused stories * refactor: updated language menu to newest mui * refactor: refactored media func * refactor: use headlessui for modal * refactor: refactor imports and exports * chore: pnpm build script * chore: added packages * chore: update package json and lock files * refactor: re-added Modal component * refactor: changed import paths internal ui package * refactor: added colors.json to be importable * refactor: changed import path * refactor: updated shared eslint and prettier * chore: reformatted files * refactor: changed type of media func * refactor: removed unused assets * refactor: refactored media functions * refactor: fixed import path * chore: updated vite to latest * chore: updated single-spa and removed unused vite plugin * fix: fixed pnpm lock * fix: removed react-refresh * fix: overrided esbuild version * fix: fixed pnpm lock * refactor: changed loading spinner to func * refactor: changed prettier to cjs file * refactor: updated mui * fix: fixed packages * fix: test version down jpg loader * fix: fixed window and document in theme context * fix: test remove theme context file * fix: fix error document * test commit * fix: use client in component * fix: under reconstruction feeds * fix: next output export --------- Co-authored-by: Nicholas Narmada * Feature: Remove bit from npmrc (#431) * fix: remove bit details from npmrc * fix: remove bit portion of readme * fix: fixing tailwind:build from tailwind to tailwindcss * feat: reorganizing meet our teams list * feat: adding alfonso lien and shiori * chore: ah comeon * chore: what in the hell is a JPG and a jpg * chore: oh Jason focus comeon why are you doing stupid stuff mistaking jpg with png * feat: adding forum into develop (#446) * feat: create single-spa app-parcel for Forum * Add explanation for adding new app-parcel in WasedaTime * Comment out routing for Career * Initialize components for Forum * feat: install tailwind in Forum * Add required utilities to Forum * Add Forum icon to navbar * feature/forum-basic-styling (#415) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * fix: arrangement between each section in Forum * fix: code style by eslint Co-authored-by: YHhaoareyou * Feature/forum-basic-routing (#416) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * pulled forum-basic into this branch * feat: filter posts by boardid, boardmenu routing * feat: "basic routing for posts + boards" * Run pnpm fix * fix: available boards Co-authored-by: YHhaoareyou * Recoil installation and defining global states (#417) * created tag modal component * added recoil in root.components.tsx * feat: define recoil state Co-authored-by: Kyoungjun Han * Feature/forum-create-thread-basic (#418) * feat: conditional create thread text area basic * feat: added tags + group buttons w/ basic toggle * feat: added submit btn (not functional) * changed default state of expanded thread input * feat: menuitems json, createthread styling * added number type for boardindex function * Run pnpm fix * Define boards & tags; change structure of dummy threads & comments * Group filter for Forum (#419) * feature: group filter styling * Update groups * feat: Toggle global states for groups when clicking on items in group menu * fix group items structure * feature: filtering function * fix: move filter functions to another file * init School filter form and add scholl icons * feat: switch open status of school filter modal * feat: tab item title, normal and active style * feat: toggle selected group by school filter * feat: moved forum folder to apps * User auth for Forum (#421) * feat: User login & verify auth when opening thread form and creating new thread * chore: add todo message for implementing submitting new thread API * feat: Add auth for comment form * feat: value and onChange func for new thread form * Customize Header for Forum (will replace Header component in other apps) * fix: default host of each microfrontend * added recoil in root.components.tsx * error report to Hao * fix: modal not showing due to wrong classname and attributes * update for jan 5 2023 * sorry it took so long * debug: recover tags modal display after adopting turbo * feat: set header input form as tag modal button * fix: removed bit from forum * fix: updated eslint config * choreL updated package json * fix: remove bit details from npmrc * fix: remove bit token form npmrc * Fix errors when importing common packages (#432) * fix: temporarily comment out error codes in Feeds * fix: update esbuild and fix tailwind build command * fix: temporarily change the target of ReactModal.setAppElement * fix: commented out translation & navigation function and fix typo of color variables * fix: language switch icon size * fix: move i18n config from packages folder to each microfrontend * fix: recover sign in modal * feat: create single-spa app-parcel for Forum * Add explanation for adding new app-parcel in WasedaTime * Comment out routing for Career * Initialize components for Forum * feat: install tailwind in Forum * Add required utilities to Forum * Add Forum icon to navbar * feature/forum-basic-styling (#415) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * fix: arrangement between each section in Forum * fix: code style by eslint Co-authored-by: YHhaoareyou * Feature/forum-basic-routing (#416) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * pulled forum-basic into this branch * feat: filter posts by boardid, boardmenu routing * feat: "basic routing for posts + boards" * Run pnpm fix * fix: available boards Co-authored-by: YHhaoareyou * Recoil installation and defining global states (#417) * created tag modal component * added recoil in root.components.tsx * feat: define recoil state Co-authored-by: Kyoungjun Han * Feature/forum-create-thread-basic (#418) * feat: conditional create thread text area basic * feat: added tags + group buttons w/ basic toggle * feat: added submit btn (not functional) * changed default state of expanded thread input * feat: menuitems json, createthread styling * added number type for boardindex function * Run pnpm fix * Define boards & tags; change structure of dummy threads & comments * Group filter for Forum (#419) * feature: group filter styling * Update groups * feat: Toggle global states for groups when clicking on items in group menu * fix group items structure * feature: filtering function * fix: move filter functions to another file * init School filter form and add scholl icons * feat: switch open status of school filter modal * feat: tab item title, normal and active style * feat: toggle selected group by school filter * feat: moved forum folder to apps * User auth for Forum (#421) * feat: User login & verify auth when opening thread form and creating new thread * chore: add todo message for implementing submitting new thread API * feat: Add auth for comment form * feat: value and onChange func for new thread form * Customize Header for Forum (will replace Header component in other apps) * fix: default host of each microfrontend * added recoil in root.components.tsx * error report to Hao * fix: modal not showing due to wrong classname and attributes * update for jan 5 2023 * sorry it took so long * debug: recover tags modal display after adopting turbo * feat: set header input form as tag modal button * fix: removed bit from forum * fix: updated eslint config * choreL updated package json * fix: remove bit token form npmrc * fix: i18n config and signInModal in Forum * fix: image config in Feeds * Feature/forum get post (#445) * feat: create single-spa app-parcel for Forum * Add explanation for adding new app-parcel in WasedaTime * Comment out routing for Career * Initialize components for Forum * feat: install tailwind in Forum * Add required utilities to Forum * Add Forum icon to navbar * feature/forum-basic-styling (#415) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * fix: arrangement between each section in Forum * fix: code style by eslint Co-authored-by: YHhaoareyou * Feature/forum-basic-routing (#416) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * pulled forum-basic into this branch * feat: filter posts by boardid, boardmenu routing * feat: "basic routing for posts + boards" * Run pnpm fix * fix: available boards Co-authored-by: YHhaoareyou * Recoil installation and defining global states (#417) * created tag modal component * added recoil in root.components.tsx * feat: define recoil state Co-authored-by: Kyoungjun Han * Feature/forum-create-thread-basic (#418) * feat: conditional create thread text area basic * feat: added tags + group buttons w/ basic toggle * feat: added submit btn (not functional) * changed default state of expanded thread input * feat: menuitems json, createthread styling * added number type for boardindex function * Run pnpm fix * Define boards & tags; change structure of dummy threads & comments * Group filter for Forum (#419) * feature: group filter styling * Update groups * feat: Toggle global states for groups when clicking on items in group menu * fix group items structure * feature: filtering function * fix: move filter functions to another file * init School filter form and add scholl icons * feat: switch open status of school filter modal * feat: tab item title, normal and active style * feat: toggle selected group by school filter * feat: moved forum folder to apps * User auth for Forum (#421) * feat: User login & verify auth when opening thread form and creating new thread * chore: add todo message for implementing submitting new thread API * feat: Add auth for comment form * feat: value and onChange func for new thread form * Customize Header for Forum (will replace Header component in other apps) * fix: default host of each microfrontend * added recoil in root.components.tsx * error report to Hao * fix: modal not showing due to wrong classname and attributes * update for jan 5 2023 * sorry it took so long * debug: recover tags modal display after adopting turbo * feat: set header input form as tag modal button * fix: removed bit from forum * fix: updated eslint config * choreL updated package json * fix: remove bit details from npmrc * fix: remove bit token form npmrc * feat: restarting branch * feat: adding changes to new branch * feat: testing * feat: adding dependency localforage * chores: small edits * feat: finishing migrate from branch to branch * feat: deleting two view sections. * feat: adding tags to post model * fix: fixed tag posting * feat: creating school choosing dropdown * chores: small adjustments * feat: updating dropdown will need to change it to something else * Feature/forum update delete post (#444) * feat: add edit and delete button & call delete api * feat: confirm delete thread modal * feat: thread edit modal (form not yet) * feat: edit thread form completed * fix: fixing out API * feat: figuring shit out * fix: undefined colors variable * feat: adding some actions too * Feature/new layout (#441) * feat: new layout * feat: whole new layout will merge to parent branch to get inifinte scroll * fix: fixing actions to compatible version * feat: infinite scroll to load more threads (#442) Co-authored-by: YHhaoareyou * feat: forum restructuring (#443) * feat: initiating new branch for hastags * feat: working on forum homepage now can call all data * feat: forum home func * yo * chorse: getting rid of stuff * feat: major changes added some refresh functionalities --------- Co-authored-by: Kyoungjun Han * feat: new prop fromRoot for link condition * chore: comment out thread edit function and button * chores: deleting comments * feat: display all threads on forum home page * feat: adding comment delete with refresh * feat: adding icon for views --------- Co-authored-by: YHhaoareyou Co-authored-by: Kyoungjun Han --------- Co-authored-by: YHhaoareyou Co-authored-by: Michael Kaminski <91806277+kamlnskll@users.noreply.github.com> Co-authored-by: Kyoungjun Han Co-authored-by: Nicholas Narmada * fix: forum was commeted out * feat: fixing board conditional * feat: fixing thread tag * feat: adding bread crumbs * feat: working but need to fix issue of mounting * feat: tags searching * feat: examining useEffect * fix: add boardId and tags as dependencies for the first useEffect * fix: scroll function activation * feat: adding search tag box * feat: Add board menu in create thread to forum root * feat: adding school selection * feat: draft of tag menu * feat: tweaking with Nicholas component * fix: fixed styling of menu button and dropdown * fix: fixed Nicholas component * feat: added some functionalities for board to tag filtiering * Revert "Merge branch 'develop' of https://github.com/wasedatime/wasedatime-web into feature/forum-basic" This reverts commit 8f529dd122369328f51fc8180bbc5ddc16b4a614, reversing changes made to b098087ecae7ed8f3226a35d9be23004eedcb116. * feat: reverting changes to original * feat: major update * feat: adding styling * feat: adding more styling I guess i am done * feat: additional tag filtering logic * fix: change feeds folder directory * feat: adding FeedBackBox * chore: replace @vitejs/plugin-react-refresh with @vitejs/plugin-react * feat: styling tags and school button * feat: fixing feed back box --------- Co-authored-by: YHhaoareyou Co-authored-by: Michael Kaminski <91806277+kamlnskll@users.noreply.github.com> Co-authored-by: Kyoungjun Han Co-authored-by: Nicholas Narmada * feat: final check on develop now time to deploy * feat: adding type safety to prevent from accessing null length * feat: adding array safety * fix: adding another type safety for response array * feat: adding some common css to see the change * feat: altering styling * feat: adding responive ness * feat: altered timeline new feature add comment logo no more title and tag * feat: changing our mission * feat: enlarging the fontsize of forums. Currently it was just too small (#453) Also changed the original eventlistener for scrolling back to infinite scroll component * fix: fixing App layout and adding onclikc to fix links (#454) * fix: fixing App layout and adding onclikc to fix links * feat: refactoring threadblock structure * chore: fixing tag typo * feat: fixing finalization * feat: adding max width to thread post card * feat: added comment count (#456) * fix: fix new feature image size * feat: adding forum comment notification functionality (#458) * fix: add Forum route to Root App.tsx * fix: add Forum routes with params in Root * chore: add Forum to sitemap * chore: test hard-coded subpath in Forum * fix: remove hard-coded path and add NotFound in Forum * feat: adding images to forums (#460) * feat: adding image indicator * feat: adding boolean flag for page thread * feat: forum-timstamp (#462) * Added Timestamp * feat: localization to JST from UTC --------- Co-authored-by: KTheAsianimeBoi * fix: fixing idToken retreaval function (#464) * fix: fixing feeds * feat: forum time formating with page thread formating (#466) * feat: disabling feeds and campus * fix:login failed error message and post direct url (#468) * feat: adding index html to forum src * feat: adding routing on index.html * feat: adding index html * feat: forum redirect and styling (#472) * feat: adding redirect logic for success and minor styling * feat: dynamic sizing * fix: unifing border thickness * feat: adding thread notification * feat: adding timeout to mobile nav bar notification * chore: getting rid of dirty code --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot Co-authored-by: Nicholas Narmada <36405403+nichnarmada@users.noreply.github.com> Co-authored-by: YHhaoareyou Co-authored-by: Nicholas Narmada Co-authored-by: Xinyue Tao <96937379+xinyue296@users.noreply.github.com> Co-authored-by: AustinZhu Co-authored-by: Ikko Ashimine Co-authored-by: Michael Kaminski <91806277+kamlnskll@users.noreply.github.com> Co-authored-by: Kyoungjun Han Co-authored-by: KTheAsianimeBoi Co-authored-by: Umar Farooq <33097722+Umar-Mughal@users.noreply.github.com> --- apps/root/src/components/frame/MobileNav.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/root/src/components/frame/MobileNav.tsx b/apps/root/src/components/frame/MobileNav.tsx index c4b714112..54e9df1ce 100644 --- a/apps/root/src/components/frame/MobileNav.tsx +++ b/apps/root/src/components/frame/MobileNav.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react" +import React, { useState, useEffect } from "react" import { getUserAttr, signOut } from "wasedatime-ui" import { useTranslation } from "react-i18next" @@ -19,6 +19,15 @@ const MobileNav = ({ navItems, openSignInModal }: Props) => { const [currentPath, setCurrentPath] = useState(window.location.pathname) const notSignedIn = !userAttr if (notSignedIn) getUserAttr().then((attr) => setUserAttr(attr)) + const [showTooltip, setShowTooltip] = useState(true) + + useEffect(() => { + const timeoutId = setTimeout(() => { + setShowTooltip(false) // Hide tooltip after 3 seconds + }, 3000) + + return () => clearTimeout(timeoutId) // Cleanup on unmount + }, []) // Run once after the initial render const styledLinks = navItems.map((item) => ( {
{item.name}
- {item.tooltip && ( + {item.tooltip && showTooltip && ( {item.tooltip} From 905f971a4aa7a1946f5119f392a27a4ea2291aa6 Mon Sep 17 00:00:00 2001 From: Jason Park <93040528+JasonNotJson@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:59:46 +0900 Subject: [PATCH 2/4] fix: fixing the forum date extract logic (#482) --- .github/workflows/deploy.yml | 14 ++++++------- apps/forum/src/utils/getDate.ts | 15 ++++++++++++++ apps/forum/src/utils/storeDate.ts | 14 ++++++------- apps/root/src/components/frame/Nav.tsx | 22 +++++++++----------- apps/root/src/utils/getDate.ts | 28 +++++++++++++------------- apps/root/src/utils/shouldCallApi.ts | 1 + 6 files changed, 53 insertions(+), 41 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a7f622b85..83813e4b4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,12 +11,11 @@ jobs: if: github.event.release.prerelease == true strategy: matrix: - microapps: - [ + microapps: [ "WEBHOOK_ROOT_DEV", "WEBHOOK_SYLLABUS_DEV", - "WEBHOOK_CAMPUS_DEV", - "WEBHOOK_FEEDS_DEV", + # "WEBHOOK_CAMPUS_DEV", + # "WEBHOOK_FEEDS_DEV", "WEBHOOK_FORUMS_DEV", ] env: @@ -30,12 +29,11 @@ jobs: if: github.event.release.prerelease != true strategy: matrix: - microapps: - [ + microapps: [ "WEBHOOK_ROOT_PROD", "WEBHOOK_SYLLABUS_PROD", - "WEBHOOK_CAMPUS_PROD", - "WEBHOOK_FEEDS_PROD", + # "WEBHOOK_CAMPUS_PROD", + # "WEBHOOK_FEEDS_PROD", "WEBHOOK_FORUMS_PROD", ] env: diff --git a/apps/forum/src/utils/getDate.ts b/apps/forum/src/utils/getDate.ts index c4ae2f6c6..6969ddc0d 100644 --- a/apps/forum/src/utils/getDate.ts +++ b/apps/forum/src/utils/getDate.ts @@ -13,3 +13,18 @@ export const getCurrentDateInJST = () => { return `${YYYY}${MM}${DD}${HH}${mm}${SS}`; }; + +export const extractDate = (fullDate: string) => { + return fullDate.substring(0, 8) + "000000"; // Extracts the first 8 characters (YYYYMMDD) +}; + +export const getCurrentDateInUTC = () => { + const date = new Date(); + const YYYY = date.getUTCFullYear(); + const MM = String(date.getUTCMonth() + 1).padStart(2, "0"); + const DD = String(date.getUTCDate()).padStart(2, "0"); + const HH = String(date.getUTCHours()).padStart(2, "0"); + const mm = String(date.getUTCMinutes()).padStart(2, "0"); + const SS = String(date.getUTCSeconds()).padStart(2, "0"); + return `${YYYY}${MM}${DD}${HH}${mm}${SS}`; +}; diff --git a/apps/forum/src/utils/storeDate.ts b/apps/forum/src/utils/storeDate.ts index 513e19fc5..942a43bea 100644 --- a/apps/forum/src/utils/storeDate.ts +++ b/apps/forum/src/utils/storeDate.ts @@ -1,14 +1,14 @@ -import { getCurrentDateInJST } from "./getDate"; +import { getCurrentDateInUTC } from "./getDate"; export const storeDate = () => { - const storedDateInJST = localStorage.getItem("lastCheckedDateJST"); - const currentDateInJST = getCurrentDateInJST(); + const storedDateInUTC = localStorage.getItem("lastCheckedDateUTC"); + const currentDateInUTC = getCurrentDateInUTC(); - if (!storedDateInJST) { + if (!storedDateInUTC) { // If there's no stored date, set the current date to local storage. - localStorage.setItem("lastCheckedDateJST", currentDateInJST); - } else if (storedDateInJST !== currentDateInJST) { + localStorage.setItem("lastCheckedDateUTC", currentDateInUTC); + } else if (storedDateInUTC !== currentDateInUTC) { // If the stored date and the current date are different, update the stored date. - localStorage.setItem("lastCheckedDateJST", currentDateInJST); + localStorage.setItem("lastCheckedDateUTC", currentDateInUTC); } }; diff --git a/apps/root/src/components/frame/Nav.tsx b/apps/root/src/components/frame/Nav.tsx index 981982898..a76a58f44 100644 --- a/apps/root/src/components/frame/Nav.tsx +++ b/apps/root/src/components/frame/Nav.tsx @@ -26,11 +26,7 @@ import { TimetableIconHovered, } from "@app/components/icons/TimetableIcon" import { ThemeContext, ThemeProvider } from "@app/utils/theme-context" -import { - getCurrentDateInJST, - getCurrentDateInUTC, - extractDate, -} from "@app/utils/getDate" +import { getCurrentDateInUTC, extractDate } from "@app/utils/getDate" import { shouldCallApi } from "@app/utils/shouldCallApi" import { fetchNotificaiton } from "@app/utils/fetchNotification" @@ -71,15 +67,17 @@ const Nav = () => { const fetchNotificationAndUpdateState = async () => { try { - const storedDateInJST = localStorage.getItem("lastCheckedDateJST") - const currentDateInJST = getCurrentDateInJST() - const storedDateOnly = extractDate(storedDateInJST || "") - const currentDateOnly = extractDate(currentDateInJST) + const storedDateInUTC = localStorage.getItem("lastCheckedDateUTC") + const currentDateInUTC = getCurrentDateInUTC() + const storedDateOnly = extractDate(storedDateInUTC || "") + const currentDateOnly = extractDate(currentDateInUTC) if (!storedDateOnly) { - localStorage.setItem("lastCheckedDateJST", currentDateInJST) + localStorage.setItem("lastCheckedDateUTC", currentDateInUTC) } else if (shouldCallApi()) { - const newPostsCount = await fetchNotificaiton(storedDateInJST || "") + const newPostsCount = await fetchNotificaiton(currentDateOnly || "") + // const newPostsCount = "" + const updatedNavItems = navItems.map((item) => item.path === "/forum" ? { @@ -92,7 +90,7 @@ const Nav = () => { : item ) setNavItems(updatedNavItems) - localStorage.setItem("lastCheckedDateJST", currentDateInJST) + localStorage.setItem("lastCheckedDateUTC", currentDateInUTC) localStorage.setItem( "lastApiCallTimestamp", new Date().getTime().toString() diff --git a/apps/root/src/utils/getDate.ts b/apps/root/src/utils/getDate.ts index 0ae37cae6..4a234a2ba 100644 --- a/apps/root/src/utils/getDate.ts +++ b/apps/root/src/utils/getDate.ts @@ -1,21 +1,21 @@ -export const getCurrentDateInJST = () => { - const date = new Date() - const jstOffset = 9 * 60 // JST is UTC+9 - const localOffset = date.getTimezoneOffset() - date.setMinutes(date.getMinutes() + localOffset + jstOffset) +// export const getCurrentDateInJST = () => { +// const date = new Date() +// const jstOffset = 9 * 60 // JST is UTC+9 +// const localOffset = date.getTimezoneOffset() +// date.setMinutes(date.getMinutes() + localOffset + jstOffset) - const YYYY = date.getFullYear() - const MM = String(date.getMonth() + 1).padStart(2, "0") // Months are 0-based - const DD = String(date.getDate()).padStart(2, "0") - const HH = String(date.getHours()).padStart(2, "0") - const mm = String(date.getMinutes()).padStart(2, "0") - const SS = String(date.getSeconds()).padStart(2, "0") +// const YYYY = date.getFullYear() +// const MM = String(date.getMonth() + 1).padStart(2, "0") // Months are 0-based +// const DD = String(date.getDate()).padStart(2, "0") +// const HH = String(date.getHours()).padStart(2, "0") +// const mm = String(date.getMinutes()).padStart(2, "0") +// const SS = String(date.getSeconds()).padStart(2, "0") - return `${YYYY}${MM}${DD}${HH}${mm}${SS}` -} +// return `${YYYY}${MM}${DD}${HH}${mm}${SS}` +// } export const extractDate = (fullDate: string) => { - return fullDate.substring(0, 8) // Extracts the first 8 characters (YYYYMMDD) + return fullDate.substring(0, 8) + "000000" // Extracts the first 8 characters (YYYYMMDD) } export const getCurrentDateInUTC = () => { diff --git a/apps/root/src/utils/shouldCallApi.ts b/apps/root/src/utils/shouldCallApi.ts index 80ad15ffb..33f0edce9 100644 --- a/apps/root/src/utils/shouldCallApi.ts +++ b/apps/root/src/utils/shouldCallApi.ts @@ -1,4 +1,5 @@ const LAST_API_CALL_TIMESTAMP = "lastApiCallTimestamp" +// const ONE_HOUR_IN_MS = 1 const ONE_HOUR_IN_MS = 60 * 60 * 1000 const convertToTimestamp = (datetime: string) => { From 070820c75389fb2cfcea05a2cdbc3be50286e257 Mon Sep 17 00:00:00 2001 From: Jason Park <93040528+JasonNotJson@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:31:02 +0900 Subject: [PATCH 3/4] feat: adding mobile ui (#484) * fix(deps): update dependency @aws-amplify/auth to v4 (#352) Co-authored-by: Renovate Bot * Feature: Added Dark theme (#365) * Theme provider to Syllabus & context to containers * Add context on components in Syllabus which may require fix for dark mode * feat: replace @reach/router to react-router v6 * feat: update header for all apps * fix: reinstall react-router-dom v6 and history after rebase * feat: add new themes * fix: lock files * feat: install TailwindCSS on Campus * feat: install TailwindCSS on Syllabus * feat: change theme-toggle color according to current theme * fix: change locations of tailwind import; remove unused log * feat: dark theme on Timetable * Feat: Added new sidebar icons from material ui icons * Feat: Separated icons into different component * fix: added package json and pnpm lock updates * feat: pass isDark property to styled components * feat: dark theme on Syllabus (CourseItem not yet) * fix: wrap ThemeProvider on Nav; use new theme colors * fix: use className instead of passing theme as props * feat: dark theme on CourseInfo (not completed) * fix: Made theme types exportable * fix: created sidebar wrapper locally instead of bit * fix: Fixed styling of icon group button * feat: added user profile icon * feat: Added dark mode styling to other links * fix: moved browser router wrapper outside to fix navigation * fix: used const instead of let for navigation hook * fix: fixed import order * feat: CourseInfo dark mode * feat: Made title logo svg into a component * fix: made title logo text colour change when theme toggle * fix: fixed extra stylings when dark mode * fix: updated package versions and pnpm lock file * feat: update loading-spinner & solve background color flicker while loading page in dark mode * feat: added dark mode styling to about us pages * feat: added dark mode styling to extra pages * feat: dark theme to mobile bottom nav * feat: update header & loading-spinner & body tag background color * feat: added dark mode background * fix: fixed title logo on sidebar not changing colours when switching modes * fix: added tab colours when dark mode * fix: added dark mode colours to partner page text * feat: dark mode for Labs * fix: related courses width * feat: update spinner in Syllabus; dark mode for Campus * fix: timetable course item scrollable space height * feat: make timetable course item darker in dark mode * feat: install tailwind in feeds (not used yet) * feat: redirecting page styling * feat: update sign in modal * feat: updated header component and pnpm lock file accordingly * fix: updated colors and header dependencies * fix: eslint fixes for campus folder * feat: added dark mode styling to campus folder * fix: eslint fixes in syllabus folder * fix: updated dark mode styling * fix: updated dark mode syllabus * fix: updated dark mode styling root folder * fix: syllabus border & step arrow color * fix: fixed styling for social media icons in partners * fix: removed unused imports * fix: Or-button dark mode color * fix: remove FilterWarningsPlugin * fix: update lock files * fix: remove -y option * fix: update lock files * fix: update @aws-amplify/auth in syllabus * fix: update loading spinner in Feeds * fix: add theme prop to LoadingSpinner in Feeds Co-authored-by: YHhaoareyou * fix: clear search keywords when onclick related courses * Debug: mobile dark mode debug (#373) * feat: dark mode & new messages on welcome modal * fix: dark mode on sign in modal & user login icon * chore(deps): update dependency eslint-plugin-react to v7.29.4 (#361) Co-authored-by: Renovate Bot * chore(deps): update dependency ts-loader to v9.2.8 (#359) Co-authored-by: Renovate Bot * feat: remove unused dependencies (#377) * Feature/darktheme colors (#378) * feat: added quarterColors for both light and dark mode * feat: Added google analytics to theme changes * fix: fixed user profile icon to make it consistent * fix: code refactoring * fix: code refactoring in syllabus * feat: added dark semantic colors * fix: added colors based on numbers too * fix: added a todo comment * fix: fix semantic text colors dark mode * feat: update quarter switch colors & icons * feat: update timetable course items and color selector with new theme colors Co-authored-by: Nicholas Narmada * Feature: Timetable dark theme (#379) * feat: Dark mode for pro tips and colors selector popup in Timetable * feat: update theme colors dependency for all apps * feat: add the hovering effect to the member cards (#381) * feat: update the hovering effect for member cards * fix: remove unused libraries; fix html background color in dark mode; disable card's hyperlink * fix: makes the code shorter and neater * fix: syllabus pnpm lock file * fix: syllabus pnpm lock file Co-authored-by: YHhaoareyou * Migrate from Webpack to Vite (#382) * feat: vite tested by career folder * feat: replace systemjs import with dynamic import to import vite project * feat: ignore dynamic import problem caused by webpack * feat: Migrate Campus from Webpack to Vite * fix: restore career * feat: register vite app campus by single-spa-layout * feat: migrate Syllabus to vite (error unsolved) * fix: fix lockfile * fix: solve "exportStar not a function", "undefined global" and use Vite envvar * feat: migrate syllabus to vite (done) * remove webpack from all apps except root * feat: migrate root to vite * feat: remove webpack related scripts & solve import-map not supported problem in Safari * feat: import static assets; solve errors of custom props passed to dom * fix: run eslint fix * fix: build script & config * feat: build config & debug global var * fix: output asset files path * feat: disable css code split in build * fix: run eslint fix * feat: preload css from mf apps to root; replace react-s-alert with react-toastify * feat: configure public path & env var for each app * fix: run eslint fix * feat: service-worker * fix: eslint fix * update lock files * fix: missing package * fix: externalize styles from other mf app * fix: campus room badge styles Co-authored-by: AustinZhu * fix: env without using dotenv explicitly (#385) * fix: packages version * fix: change env var name * fix: remove systemjs package; add peer dependencies * fix: feeds domain on staging/prod * Feature: About Us page link from Home page & split Home from Root-config (#387) * fix: remove custom sw * feat: add link to aboutus page from home * fix: eslint * Feature/fix card padding (#388) * fix: fixing the responsive design for members card * fix: fixing the responsive design for members card * fix: font color, repeated className, figure tag * fix: install missing dependency: @aws-amplify/core * fix: remove course function * feat: alert translation * fix: eslint * feat: add workbox runtimeCaching config * Fix service worker to enable it to replace old one (#389) * fix: add cleanupOutdatedCaches option * use custom sw & force update * skipWaiting and claim before cleanupOutdatedCaches * add ts files to NetworkFirst cache * remove ts from cache * register sw on index.html * change sw from ts to js * test updates to trigger build * registerSW in index.html * remove unused code and comment of registering sw * update files to trigger build * feat: add a profile card component; add hover & click effect; add a closing tab on cards (#390) * feat: add a profile card component; add hover & click effect; add closing tab on cards * fix: rename profile card & prop; type for useState * fix: syllabus minor styling issues * Update README.md * Migrate from Webpack to Vite (#386) * fix(deps): update dependency @aws-amplify/auth to v4 (#352) Co-authored-by: Renovate Bot * Feature: Added Dark theme (#365) * Theme provider to Syllabus & context to containers * Add context on components in Syllabus which may require fix for dark mode * feat: replace @reach/router to react-router v6 * feat: update header for all apps * fix: reinstall react-router-dom v6 and history after rebase * feat: add new themes * fix: lock files * feat: install TailwindCSS on Campus * feat: install TailwindCSS on Syllabus * feat: change theme-toggle color according to current theme * fix: change locations of tailwind import; remove unused log * feat: dark theme on Timetable * Feat: Added new sidebar icons from material ui icons * Feat: Separated icons into different component * fix: added package json and pnpm lock updates * feat: pass isDark property to styled components * feat: dark theme on Syllabus (CourseItem not yet) * fix: wrap ThemeProvider on Nav; use new theme colors * fix: use className instead of passing theme as props * feat: dark theme on CourseInfo (not completed) * fix: Made theme types exportable * fix: created sidebar wrapper locally instead of bit * fix: Fixed styling of icon group button * feat: added user profile icon * feat: Added dark mode styling to other links * fix: moved browser router wrapper outside to fix navigation * fix: used const instead of let for navigation hook * fix: fixed import order * feat: CourseInfo dark mode * feat: Made title logo svg into a component * fix: made title logo text colour change when theme toggle * fix: fixed extra stylings when dark mode * fix: updated package versions and pnpm lock file * feat: update loading-spinner & solve background color flicker while loading page in dark mode * feat: added dark mode styling to about us pages * feat: added dark mode styling to extra pages * feat: dark theme to mobile bottom nav * feat: update header & loading-spinner & body tag background color * feat: added dark mode background * fix: fixed title logo on sidebar not changing colours when switching modes * fix: added tab colours when dark mode * fix: added dark mode colours to partner page text * feat: dark mode for Labs * fix: related courses width * feat: update spinner in Syllabus; dark mode for Campus * fix: timetable course item scrollable space height * feat: make timetable course item darker in dark mode * feat: install tailwind in feeds (not used yet) * feat: redirecting page styling * feat: update sign in modal * feat: updated header component and pnpm lock file accordingly * fix: updated colors and header dependencies * fix: eslint fixes for campus folder * feat: added dark mode styling to campus folder * fix: eslint fixes in syllabus folder * fix: updated dark mode styling * fix: updated dark mode syllabus * fix: updated dark mode styling root folder * fix: syllabus border & step arrow color * fix: fixed styling for social media icons in partners * fix: removed unused imports * fix: Or-button dark mode color * fix: remove FilterWarningsPlugin * fix: update lock files * fix: remove -y option * fix: update lock files * fix: update @aws-amplify/auth in syllabus * fix: update loading spinner in Feeds * fix: add theme prop to LoadingSpinner in Feeds Co-authored-by: YHhaoareyou * fix: clear search keywords when onclick related courses * Debug: mobile dark mode debug (#373) * feat: dark mode & new messages on welcome modal * fix: dark mode on sign in modal & user login icon * chore(deps): update dependency eslint-plugin-react to v7.29.4 (#361) Co-authored-by: Renovate Bot * chore(deps): update dependency ts-loader to v9.2.8 (#359) Co-authored-by: Renovate Bot * feat: remove unused dependencies (#377) * Feature/darktheme colors (#378) * feat: added quarterColors for both light and dark mode * feat: Added google analytics to theme changes * fix: fixed user profile icon to make it consistent * fix: code refactoring * fix: code refactoring in syllabus * feat: added dark semantic colors * fix: added colors based on numbers too * fix: added a todo comment * fix: fix semantic text colors dark mode * feat: update quarter switch colors & icons * feat: update timetable course items and color selector with new theme colors Co-authored-by: Nicholas Narmada * Feature: Timetable dark theme (#379) * feat: Dark mode for pro tips and colors selector popup in Timetable * feat: update theme colors dependency for all apps * feat: add the hovering effect to the member cards (#381) * feat: update the hovering effect for member cards * fix: remove unused libraries; fix html background color in dark mode; disable card's hyperlink * fix: makes the code shorter and neater * fix: syllabus pnpm lock file * fix: syllabus pnpm lock file Co-authored-by: YHhaoareyou * Migrate from Webpack to Vite (#382) * feat: vite tested by career folder * feat: replace systemjs import with dynamic import to import vite project * feat: ignore dynamic import problem caused by webpack * feat: Migrate Campus from Webpack to Vite * fix: restore career * feat: register vite app campus by single-spa-layout * feat: migrate Syllabus to vite (error unsolved) * fix: fix lockfile * fix: solve "exportStar not a function", "undefined global" and use Vite envvar * feat: migrate syllabus to vite (done) * remove webpack from all apps except root * feat: migrate root to vite * feat: remove webpack related scripts & solve import-map not supported problem in Safari * feat: import static assets; solve errors of custom props passed to dom * fix: run eslint fix * fix: build script & config * feat: build config & debug global var * fix: output asset files path * feat: disable css code split in build * fix: run eslint fix * feat: preload css from mf apps to root; replace react-s-alert with react-toastify * feat: configure public path & env var for each app * fix: run eslint fix * feat: service-worker * fix: eslint fix * update lock files * fix: missing package * fix: externalize styles from other mf app * fix: campus room badge styles Co-authored-by: AustinZhu * fix: env without using dotenv explicitly (#385) * fix: packages version * fix: change env var name * fix: remove systemjs package; add peer dependencies * fix: feeds domain on staging/prod * Feature: About Us page link from Home page & split Home from Root-config (#387) * fix: remove custom sw * feat: add link to aboutus page from home * fix: eslint * Feature/fix card padding (#388) * fix: fixing the responsive design for members card * fix: fixing the responsive design for members card * fix: font color, repeated className, figure tag * fix: install missing dependency: @aws-amplify/core * fix: remove course function * feat: alert translation * fix: eslint * feat: add workbox runtimeCaching config * Fix service worker to enable it to replace old one (#389) * fix: add cleanupOutdatedCaches option * use custom sw & force update * skipWaiting and claim before cleanupOutdatedCaches * add ts files to NetworkFirst cache * remove ts from cache * register sw on index.html * change sw from ts to js * test updates to trigger build * registerSW in index.html * remove unused code and comment of registering sw * update files to trigger build * feat: add a profile card component; add hover & click effect; add a closing tab on cards (#390) * feat: add a profile card component; add hover & click effect; add closing tab on cards * fix: rename profile card & prop; type for useState * fix: syllabus minor styling issues * Update README.md Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot Co-authored-by: Nicholas Narmada <36405403+nichnarmada@users.noreply.github.com> Co-authored-by: Nicholas Narmada Co-authored-by: Xinyue Tao <96937379+xinyue296@users.noreply.github.com> Co-authored-by: AustinZhu * add script-src-elem to Content Security Policy (#391) * Hotfix (#392) * add script-src-elem to Content Security Policy * fix csp * Hotfix (#393) * add script-src-elem to Content Security Policy * fix csp * add blob:https: to csp * fix blob in csp * fix: remove csp * fix: remove all webpack-related packages & setting * Allow all in CSP * Fix: preload style, csp allow all, refactor index html & env var (#404) * fix style prelload link * refactor index.html & add env variables * remove slash from the end of base path env var * import other mf's css files as external * run eslint fix * run eslint fix * Update README.md (#397) Github -> GitHub * chore(deps): update dependency esbuild to v0.14.43 (#384) Co-authored-by: Renovate Bot * chore(deps): update dependencies * chore(deps): update dependencies * chore(deps): update dependencies * fix: preload & enable styles from other mf app * fix: packages version (fix React to v17) * Language filter for Feeds (#409) * filter feeds by language * feat: styling lang filter button * feat: Back button to Feeds list page * Remove using @apply in css file due to amp style problem * feat: added turbo-repo woooo (#420) * update feeds * update feeds * refactor: refactored project structure * feat: added turborepo * feat: eslint custom config dependency * fix: fix lint script * fix: removed self dependent dependencies * chore: pnpm lock updates * fix: remove dont purge tailwind from script * feat: add turbo scripts to monorepo * fix: fixed folder paths for github actions * fix: fixed campus pnpm-lock file * fix: updated pnpm lock again * fix: updated types for feed info * fix: feeds submodule & root env & campus type mismatch Co-authored-by: YHhaoareyou * feat: adding web hooks for forums * feat: updating meet our team page (#426) * feat: editing meet our team page * feat: adding michael to the MeetOurMembers page * feat: edited my position * feat: changing Jason's role to cheerleader * fix: downgrade pnpm version for test * feat: adding gunjan and aditya to the team * fix: fixing aditya image * feat: adding pam to the team * fix:fixing pnpm lock issues --------- Co-authored-by: YHhaoareyou * Export Bit components to turborepo packages (#428) * feat: created ui package * feat: added tailwind and prettier * chore: file linting * refactor: removed unnecessary files * refactor: configured build * feature: add storybook * feat: import all bit components * refactor: remove unused stories * refactor: updated language menu to newest mui * refactor: refactored media func * refactor: use headlessui for modal * refactor: refactor imports and exports * chore: pnpm build script * chore: added packages * chore: update package json and lock files * refactor: re-added Modal component * refactor: changed import paths internal ui package * refactor: added colors.json to be importable * refactor: changed import path * refactor: updated shared eslint and prettier * chore: reformatted files * refactor: changed type of media func * refactor: removed unused assets * refactor: refactored media functions * refactor: fixed import path * chore: updated vite to latest * chore: updated single-spa and removed unused vite plugin * fix: fixed pnpm lock * fix: removed react-refresh * fix: overrided esbuild version * fix: fixed pnpm lock * refactor: changed loading spinner to func * refactor: changed prettier to cjs file * refactor: updated mui * fix: fixed packages * fix: test version down jpg loader * fix: fixed window and document in theme context * fix: test remove theme context file * fix: fix error document * test commit * fix: use client in component * fix: under reconstruction feeds * fix: next output export --------- Co-authored-by: Nicholas Narmada * Feature: Remove bit from npmrc (#431) * fix: remove bit details from npmrc * fix: remove bit portion of readme * fix: fixing tailwind:build from tailwind to tailwindcss * feat: reorganizing meet our teams list * feat: adding alfonso lien and shiori * chore: ah comeon * chore: what in the hell is a JPG and a jpg * chore: oh Jason focus comeon why are you doing stupid stuff mistaking jpg with png * feat: adding forum into develop (#446) * feat: create single-spa app-parcel for Forum * Add explanation for adding new app-parcel in WasedaTime * Comment out routing for Career * Initialize components for Forum * feat: install tailwind in Forum * Add required utilities to Forum * Add Forum icon to navbar * feature/forum-basic-styling (#415) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * fix: arrangement between each section in Forum * fix: code style by eslint Co-authored-by: YHhaoareyou * Feature/forum-basic-routing (#416) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * pulled forum-basic into this branch * feat: filter posts by boardid, boardmenu routing * feat: "basic routing for posts + boards" * Run pnpm fix * fix: available boards Co-authored-by: YHhaoareyou * Recoil installation and defining global states (#417) * created tag modal component * added recoil in root.components.tsx * feat: define recoil state Co-authored-by: Kyoungjun Han * Feature/forum-create-thread-basic (#418) * feat: conditional create thread text area basic * feat: added tags + group buttons w/ basic toggle * feat: added submit btn (not functional) * changed default state of expanded thread input * feat: menuitems json, createthread styling * added number type for boardindex function * Run pnpm fix * Define boards & tags; change structure of dummy threads & comments * Group filter for Forum (#419) * feature: group filter styling * Update groups * feat: Toggle global states for groups when clicking on items in group menu * fix group items structure * feature: filtering function * fix: move filter functions to another file * init School filter form and add scholl icons * feat: switch open status of school filter modal * feat: tab item title, normal and active style * feat: toggle selected group by school filter * feat: moved forum folder to apps * User auth for Forum (#421) * feat: User login & verify auth when opening thread form and creating new thread * chore: add todo message for implementing submitting new thread API * feat: Add auth for comment form * feat: value and onChange func for new thread form * Customize Header for Forum (will replace Header component in other apps) * fix: default host of each microfrontend * added recoil in root.components.tsx * error report to Hao * fix: modal not showing due to wrong classname and attributes * update for jan 5 2023 * sorry it took so long * debug: recover tags modal display after adopting turbo * feat: set header input form as tag modal button * fix: removed bit from forum * fix: updated eslint config * choreL updated package json * fix: remove bit details from npmrc * fix: remove bit token form npmrc * Fix errors when importing common packages (#432) * fix: temporarily comment out error codes in Feeds * fix: update esbuild and fix tailwind build command * fix: temporarily change the target of ReactModal.setAppElement * fix: commented out translation & navigation function and fix typo of color variables * fix: language switch icon size * fix: move i18n config from packages folder to each microfrontend * fix: recover sign in modal * feat: create single-spa app-parcel for Forum * Add explanation for adding new app-parcel in WasedaTime * Comment out routing for Career * Initialize components for Forum * feat: install tailwind in Forum * Add required utilities to Forum * Add Forum icon to navbar * feature/forum-basic-styling (#415) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * fix: arrangement between each section in Forum * fix: code style by eslint Co-authored-by: YHhaoareyou * Feature/forum-basic-routing (#416) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * pulled forum-basic into this branch * feat: filter posts by boardid, boardmenu routing * feat: "basic routing for posts + boards" * Run pnpm fix * fix: available boards Co-authored-by: YHhaoareyou * Recoil installation and defining global states (#417) * created tag modal component * added recoil in root.components.tsx * feat: define recoil state Co-authored-by: Kyoungjun Han * Feature/forum-create-thread-basic (#418) * feat: conditional create thread text area basic * feat: added tags + group buttons w/ basic toggle * feat: added submit btn (not functional) * changed default state of expanded thread input * feat: menuitems json, createthread styling * added number type for boardindex function * Run pnpm fix * Define boards & tags; change structure of dummy threads & comments * Group filter for Forum (#419) * feature: group filter styling * Update groups * feat: Toggle global states for groups when clicking on items in group menu * fix group items structure * feature: filtering function * fix: move filter functions to another file * init School filter form and add scholl icons * feat: switch open status of school filter modal * feat: tab item title, normal and active style * feat: toggle selected group by school filter * feat: moved forum folder to apps * User auth for Forum (#421) * feat: User login & verify auth when opening thread form and creating new thread * chore: add todo message for implementing submitting new thread API * feat: Add auth for comment form * feat: value and onChange func for new thread form * Customize Header for Forum (will replace Header component in other apps) * fix: default host of each microfrontend * added recoil in root.components.tsx * error report to Hao * fix: modal not showing due to wrong classname and attributes * update for jan 5 2023 * sorry it took so long * debug: recover tags modal display after adopting turbo * feat: set header input form as tag modal button * fix: removed bit from forum * fix: updated eslint config * choreL updated package json * fix: remove bit token form npmrc * fix: i18n config and signInModal in Forum * fix: image config in Feeds * Feature/forum get post (#445) * feat: create single-spa app-parcel for Forum * Add explanation for adding new app-parcel in WasedaTime * Comment out routing for Career * Initialize components for Forum * feat: install tailwind in Forum * Add required utilities to Forum * Add Forum icon to navbar * feature/forum-basic-styling (#415) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * fix: arrangement between each section in Forum * fix: code style by eslint Co-authored-by: YHhaoareyou * Feature/forum-basic-routing (#416) * feat: added basic styling + dummy data for forum incl. board, comments and comment form * pulled forum-basic into this branch * feat: filter posts by boardid, boardmenu routing * feat: "basic routing for posts + boards" * Run pnpm fix * fix: available boards Co-authored-by: YHhaoareyou * Recoil installation and defining global states (#417) * created tag modal component * added recoil in root.components.tsx * feat: define recoil state Co-authored-by: Kyoungjun Han * Feature/forum-create-thread-basic (#418) * feat: conditional create thread text area basic * feat: added tags + group buttons w/ basic toggle * feat: added submit btn (not functional) * changed default state of expanded thread input * feat: menuitems json, createthread styling * added number type for boardindex function * Run pnpm fix * Define boards & tags; change structure of dummy threads & comments * Group filter for Forum (#419) * feature: group filter styling * Update groups * feat: Toggle global states for groups when clicking on items in group menu * fix group items structure * feature: filtering function * fix: move filter functions to another file * init School filter form and add scholl icons * feat: switch open status of school filter modal * feat: tab item title, normal and active style * feat: toggle selected group by school filter * feat: moved forum folder to apps * User auth for Forum (#421) * feat: User login & verify auth when opening thread form and creating new thread * chore: add todo message for implementing submitting new thread API * feat: Add auth for comment form * feat: value and onChange func for new thread form * Customize Header for Forum (will replace Header component in other apps) * fix: default host of each microfrontend * added recoil in root.components.tsx * error report to Hao * fix: modal not showing due to wrong classname and attributes * update for jan 5 2023 * sorry it took so long * debug: recover tags modal display after adopting turbo * feat: set header input form as tag modal button * fix: removed bit from forum * fix: updated eslint config * choreL updated package json * fix: remove bit details from npmrc * fix: remove bit token form npmrc * feat: restarting branch * feat: adding changes to new branch * feat: testing * feat: adding dependency localforage * chores: small edits * feat: finishing migrate from branch to branch * feat: deleting two view sections. * feat: adding tags to post model * fix: fixed tag posting * feat: creating school choosing dropdown * chores: small adjustments * feat: updating dropdown will need to change it to something else * Feature/forum update delete post (#444) * feat: add edit and delete button & call delete api * feat: confirm delete thread modal * feat: thread edit modal (form not yet) * feat: edit thread form completed * fix: fixing out API * feat: figuring shit out * fix: undefined colors variable * feat: adding some actions too * Feature/new layout (#441) * feat: new layout * feat: whole new layout will merge to parent branch to get inifinte scroll * fix: fixing actions to compatible version * feat: infinite scroll to load more threads (#442) Co-authored-by: YHhaoareyou * feat: forum restructuring (#443) * feat: initiating new branch for hastags * feat: working on forum homepage now can call all data * feat: forum home func * yo * chorse: getting rid of stuff * feat: major changes added some refresh functionalities --------- Co-authored-by: Kyoungjun Han * feat: new prop fromRoot for link condition * chore: comment out thread edit function and button * chores: deleting comments * feat: display all threads on forum home page * feat: adding comment delete with refresh * feat: adding icon for views --------- Co-authored-by: YHhaoareyou Co-authored-by: Kyoungjun Han --------- Co-authored-by: YHhaoareyou Co-authored-by: Michael Kaminski <91806277+kamlnskll@users.noreply.github.com> Co-authored-by: Kyoungjun Han Co-authored-by: Nicholas Narmada * fix: forum was commeted out * feat: fixing board conditional * feat: fixing thread tag * feat: adding bread crumbs * feat: working but need to fix issue of mounting * feat: tags searching * feat: examining useEffect * fix: add boardId and tags as dependencies for the first useEffect * fix: scroll function activation * feat: adding search tag box * feat: Add board menu in create thread to forum root * feat: adding school selection * feat: draft of tag menu * feat: tweaking with Nicholas component * fix: fixed styling of menu button and dropdown * fix: fixed Nicholas component * feat: added some functionalities for board to tag filtiering * Revert "Merge branch 'develop' of https://github.com/wasedatime/wasedatime-web into feature/forum-basic" This reverts commit 8f529dd122369328f51fc8180bbc5ddc16b4a614, reversing changes made to b098087ecae7ed8f3226a35d9be23004eedcb116. * feat: reverting changes to original * feat: major update * feat: adding styling * feat: adding more styling I guess i am done * feat: additional tag filtering logic * fix: change feeds folder directory * feat: adding FeedBackBox * chore: replace @vitejs/plugin-react-refresh with @vitejs/plugin-react * feat: styling tags and school button * feat: fixing feed back box --------- Co-authored-by: YHhaoareyou Co-authored-by: Michael Kaminski <91806277+kamlnskll@users.noreply.github.com> Co-authored-by: Kyoungjun Han Co-authored-by: Nicholas Narmada * feat: final check on develop now time to deploy * feat: adding type safety to prevent from accessing null length * feat: adding array safety * fix: adding another type safety for response array * feat: adding some common css to see the change * feat: altering styling * feat: adding responive ness * feat: altered timeline new feature add comment logo no more title and tag * feat: changing our mission * feat: enlarging the fontsize of forums. Currently it was just too small (#453) Also changed the original eventlistener for scrolling back to infinite scroll component * fix: fixing App layout and adding onclikc to fix links (#454) * fix: fixing App layout and adding onclikc to fix links * feat: refactoring threadblock structure * chore: fixing tag typo * feat: fixing finalization * feat: adding max width to thread post card * feat: added comment count (#456) * fix: fix new feature image size * feat: adding forum comment notification functionality (#458) * fix: add Forum route to Root App.tsx * fix: add Forum routes with params in Root * chore: add Forum to sitemap * chore: test hard-coded subpath in Forum * fix: remove hard-coded path and add NotFound in Forum * feat: adding images to forums (#460) * feat: adding image indicator * feat: adding boolean flag for page thread * feat: forum-timstamp (#462) * Added Timestamp * feat: localization to JST from UTC --------- Co-authored-by: KTheAsianimeBoi * fix: fixing idToken retreaval function (#464) * fix: fixing feeds * feat: forum time formating with page thread formating (#466) * feat: disabling feeds and campus * fix:login failed error message and post direct url (#468) * feat: adding index html to forum src * feat: adding routing on index.html * feat: adding index html * feat: forum redirect and styling (#472) * feat: adding redirect logic for success and minor styling * feat: dynamic sizing * fix: unifing border thickness * feat: adding thread notification * feat: adding timeout to mobile nav bar notification * chore: getting rid of dirty code * Feature/forum mobile UI (#483) * basic implementation of responsive filter completed * yo * feat: adding changes and solving merge conflicts * feat: refactoring the sizes * feat: resizing thread block and hiding filter button * feat: changing screen size * feat: changing filtering icon --------- Co-authored-by: Kyoungjun Han * feat: changing the git actions yml --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot Co-authored-by: Nicholas Narmada <36405403+nichnarmada@users.noreply.github.com> Co-authored-by: YHhaoareyou Co-authored-by: Nicholas Narmada Co-authored-by: Xinyue Tao <96937379+xinyue296@users.noreply.github.com> Co-authored-by: AustinZhu Co-authored-by: Ikko Ashimine Co-authored-by: Michael Kaminski <91806277+kamlnskll@users.noreply.github.com> Co-authored-by: Kyoungjun Han Co-authored-by: KTheAsianimeBoi Co-authored-by: Umar Farooq <33097722+Umar-Mughal@users.noreply.github.com> --- apps/forum/{src/components => }/index.html | 0 apps/forum/src/components/App.tsx | 54 ++++++++++++++++++---- apps/forum/src/components/Board.tsx | 3 +- apps/forum/src/components/BoardMenu.tsx | 2 +- apps/forum/src/components/FeedBackBox.tsx | 2 +- apps/forum/src/components/FilterMenu.tsx | 2 +- apps/forum/src/components/Thread.tsx | 2 +- apps/forum/src/components/ThreadBlock.tsx | 4 +- apps/forum/src/root.component.tsx | 2 +- apps/forum/src/styles/main.css | 28 +++++++++++ 10 files changed, 82 insertions(+), 17 deletions(-) rename apps/forum/{src/components => }/index.html (100%) diff --git a/apps/forum/src/components/index.html b/apps/forum/index.html similarity index 100% rename from apps/forum/src/components/index.html rename to apps/forum/index.html diff --git a/apps/forum/src/components/App.tsx b/apps/forum/src/components/App.tsx index 914e1e859..eb3bf5dfb 100644 --- a/apps/forum/src/components/App.tsx +++ b/apps/forum/src/components/App.tsx @@ -1,6 +1,12 @@ -import React, { useEffect, useState, lazy, Suspense } from "react"; +import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { BrowserRouter, Routes, Route, useNavigate } from "react-router-dom"; +import { + BrowserRouter, + Routes, + Route, + useNavigate, + useLocation, +} from "react-router-dom"; import HeaderWithModal from "@app/components/common/HeaderWithModal"; import { ThemeContext } from "@app/utils/theme-context"; import Board from "./Board"; @@ -13,6 +19,7 @@ import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import { API } from "@aws-amplify/api"; import { getUserAttr, getIdToken, LoadingSpinner } from "wasedatime-ui"; import { storeDate } from "@app/utils/storeDate"; +import FilterAltIcon from "@mui/icons-material/FilterAlt"; const App = () => { return ( @@ -35,6 +42,7 @@ const NotFound = () => { }; const InnerApp = () => { + const location = useLocation(); const { t, i18n } = useTranslation(); const { theme, setTheme } = React.useContext(ThemeContext); @@ -42,6 +50,11 @@ const InnerApp = () => { const [board, setBoard] = useState(""); const [commentNotify, setCommentNotify] = useState(false); const navigate = useNavigate(); + const [filterButtonClicked, setFilterButtonClicked] = useState(false); + + const isThreadRoute = + location.pathname.includes("forum/") && + location.pathname.split("/").length === 4; const handleReset = () => { navigate("/forum"); @@ -71,6 +84,10 @@ const InnerApp = () => { storeDate(); }, []); + const handleFilterButtonClick = () => { + setFilterButtonClicked(!filterButtonClicked); + }; + return ( <>
@@ -89,17 +106,14 @@ const InnerApp = () => { commentNotify={commentNotify} />
-
- {/*
*/} -
-
- {/* */} +
+
+
@@ -107,7 +121,29 @@ const InnerApp = () => {
-
+ {!isThreadRoute && ( + + )} + {filterButtonClicked && ( +
+ + + + +
+ )} + +
} diff --git a/apps/forum/src/components/Board.tsx b/apps/forum/src/components/Board.tsx index 10ca68a71..002c5dcf1 100644 --- a/apps/forum/src/components/Board.tsx +++ b/apps/forum/src/components/Board.tsx @@ -132,7 +132,8 @@ const Board = ({ triggerRefresh, setBoard }: any) => { return ( //
-
+ +
{ return (
-

Topics

+

Topics

{boards.map((board, i) => (
{ return (
-

Feedback

+

Feedback

This is WasedaTime forum beta.
diff --git a/apps/forum/src/components/FilterMenu.tsx b/apps/forum/src/components/FilterMenu.tsx index ef563053c..ffc059271 100644 --- a/apps/forum/src/components/FilterMenu.tsx +++ b/apps/forum/src/components/FilterMenu.tsx @@ -11,7 +11,7 @@ const FilterMenu = () => { return (

-

School

+

School