Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding mobile ui #484

Merged
merged 122 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
c8b297b
fix(deps): update dependency @aws-amplify/auth to v4 (#352)
renovate[bot] Mar 23, 2022
0504ac9
Feature: Added Dark theme (#365)
nichnarmada Mar 27, 2022
d789596
fix: clear search keywords when onclick related courses
YHhaoareyou Mar 27, 2022
fba8238
Merge branch 'master' into develop
YHhaoareyou Mar 27, 2022
4cc5b89
Merge branch 'master' into develop
YHhaoareyou Mar 29, 2022
bc8ecd7
Merge branch 'master' into develop
YHhaoareyou Mar 29, 2022
67b4a97
Debug: mobile dark mode debug (#373)
YHhaoareyou Apr 1, 2022
ed25abf
chore(deps): update dependency eslint-plugin-react to v7.29.4 (#361)
renovate[bot] Apr 1, 2022
86a91f5
chore(deps): update dependency ts-loader to v9.2.8 (#359)
renovate[bot] Apr 1, 2022
374a41a
feat: remove unused dependencies (#377)
YHhaoareyou Apr 13, 2022
6632a95
Feature/darktheme colors (#378)
YHhaoareyou Apr 13, 2022
2f8dd9b
Merge branch 'master' into develop
YHhaoareyou Apr 17, 2022
8492b1c
Feature: Timetable dark theme (#379)
YHhaoareyou Apr 18, 2022
66db621
feat: add the hovering effect to the member cards (#381)
xinyue296 Apr 26, 2022
ef10256
Migrate from Webpack to Vite (#382)
YHhaoareyou May 2, 2022
84b2c1d
fix: env without using dotenv explicitly (#385)
YHhaoareyou May 5, 2022
c3abb53
fix: packages version
YHhaoareyou May 5, 2022
5993df1
fix: change env var name
YHhaoareyou May 5, 2022
76976ee
fix: remove systemjs package; add peer dependencies
YHhaoareyou May 5, 2022
e52cdef
fix: feeds domain on staging/prod
YHhaoareyou May 5, 2022
59fdef5
Feature: About Us page link from Home page & split Home from Root-con…
YHhaoareyou May 6, 2022
8252657
Feature/fix card padding (#388)
xinyue296 May 10, 2022
f509547
Merge branch 'master' into develop
YHhaoareyou May 17, 2022
25973a1
fix: install missing dependency: @aws-amplify/core
YHhaoareyou May 17, 2022
8f4caf8
fix: remove course function
YHhaoareyou May 18, 2022
e8a35a6
feat: alert translation
YHhaoareyou May 18, 2022
c0585c1
fix: eslint
YHhaoareyou May 18, 2022
5d47e3c
feat: add workbox runtimeCaching config
YHhaoareyou May 19, 2022
7c6cd35
Fix service worker to enable it to replace old one (#389)
YHhaoareyou May 20, 2022
626ceca
feat: add a profile card component; add hover & click effect; add a c…
xinyue296 May 23, 2022
4bc712d
fix: syllabus minor styling issues
YHhaoareyou May 29, 2022
6245a70
Update README.md
YHhaoareyou May 29, 2022
156663d
Migrate from Webpack to Vite (#386)
YHhaoareyou May 29, 2022
6c911c8
add script-src-elem to Content Security Policy (#391)
YHhaoareyou May 29, 2022
081c41c
Hotfix (#392)
YHhaoareyou May 29, 2022
d1e063a
Hotfix (#393)
YHhaoareyou May 29, 2022
bbc1a69
Merge branch 'master' into develop
YHhaoareyou May 29, 2022
4f556ac
fix blob in csp
YHhaoareyou May 29, 2022
6fa7950
Merge branch 'master' into develop
YHhaoareyou May 30, 2022
8b825bf
fix: remove csp
YHhaoareyou May 30, 2022
893d781
Merge branch 'master' into develop
YHhaoareyou May 30, 2022
0af6214
fix: remove all webpack-related packages & setting
YHhaoareyou May 30, 2022
969da50
Allow all in CSP
YHhaoareyou May 30, 2022
a552f36
Merge branch 'master' into develop
YHhaoareyou May 30, 2022
2505b59
Fix: preload style, csp allow all, refactor index html & env var (#404)
YHhaoareyou May 31, 2022
25cdc27
Update README.md (#397)
eltociear Jun 8, 2022
0bc6cd2
chore(deps): update dependency esbuild to v0.14.43 (#384)
renovate[bot] Jun 8, 2022
c40864e
Merge branch 'master' into develop
AustinZhu Jun 8, 2022
02849a9
chore(deps): update dependencies
AustinZhu Jun 8, 2022
fc74d84
chore(deps): update dependencies
AustinZhu Jun 8, 2022
5470785
chore(deps): update dependencies
AustinZhu Jun 8, 2022
768301a
fix: preload & enable styles from other mf app
YHhaoareyou Jul 6, 2022
6c87d18
fix: packages version (fix React to v17)
YHhaoareyou Jul 6, 2022
b3484e5
Merge branch 'master' into develop
YHhaoareyou Aug 16, 2022
4606cab
Language filter for Feeds (#409)
YHhaoareyou Oct 3, 2022
5f94f13
Merge branch 'master' into develop
YHhaoareyou Oct 27, 2022
10e0f20
feat: added turbo-repo woooo (#420)
nichnarmada Jan 19, 2023
f76867f
Merge branch 'master' into develop
YHhaoareyou Mar 11, 2023
5c1a08b
feat: adding web hooks for forums
JasonNotJson Apr 16, 2023
d0d4ec3
Merge pull request #425 from wasedatime/feat/add-webhook
YHhaoareyou May 3, 2023
5837cc8
feat: updating meet our team page (#426)
JasonNotJson May 5, 2023
2d27b2c
Export Bit components to turborepo packages (#428)
YHhaoareyou May 25, 2023
d04f3c6
Feature: Remove bit from npmrc (#431)
nichnarmada Jun 22, 2023
dffbc9f
fix: fixing tailwind:build from tailwind to tailwindcss
JasonNotJson Jun 22, 2023
714dcbf
feat: reorganizing meet our teams list
JasonNotJson Sep 12, 2023
2e262e7
feat: adding alfonso lien and shiori
JasonNotJson Sep 12, 2023
87a8890
chore: ah comeon
JasonNotJson Sep 12, 2023
f8bf2dc
chore: what in the hell is a JPG and a jpg
JasonNotJson Sep 12, 2023
b70493e
chore: oh Jason focus comeon why are you doing stupid stuff mistaking…
JasonNotJson Sep 12, 2023
a8fc457
feat: adding forum into develop (#446)
JasonNotJson Sep 12, 2023
b345a28
feat: final check on develop now time to deploy
JasonNotJson Sep 12, 2023
ca4437e
feat: merge conflict resolution
JasonNotJson Sep 12, 2023
7d15560
feat: adding type safety to prevent from accessing null length
JasonNotJson Sep 12, 2023
57b72ab
feat: adding array safety
JasonNotJson Sep 12, 2023
0b88bb2
fix: adding another type safety for response array
JasonNotJson Sep 12, 2023
42d3388
feat: adding some common css to see the change
JasonNotJson Sep 12, 2023
8cbb193
feat: altering styling
JasonNotJson Sep 12, 2023
961c070
feat: adding responive ness
JasonNotJson Sep 12, 2023
04d52c8
feat: altered timeline new feature add comment logo no more title and…
JasonNotJson Sep 12, 2023
56f8541
Merge branch 'master' into develop
JasonNotJson Sep 12, 2023
0a557cf
feat: changing our mission
JasonNotJson Sep 12, 2023
a155d54
feat: enlarging the fontsize of forums. Currently it was just too sma…
JasonNotJson Sep 13, 2023
1ccc5b1
fix: fixing App layout and adding onclikc to fix links (#454)
JasonNotJson Sep 13, 2023
9e1eca3
feat: fixing finalization
JasonNotJson Sep 13, 2023
7e3680f
Merge branch 'develop' of https://github.com/wasedatime/wasedatime-we…
JasonNotJson Sep 13, 2023
0a57ff8
feat: adding max width to thread post card
JasonNotJson Sep 13, 2023
8f84951
Merge branch 'master' into develop
JasonNotJson Sep 13, 2023
a83c7d4
feat: added comment count (#456)
JasonNotJson Sep 17, 2023
5575654
fix: fix new feature image size
JasonNotJson Sep 17, 2023
2c972de
feat: resolving merge conflicts
JasonNotJson Sep 17, 2023
36f7e02
feat: adding forum comment notification functionality (#458)
JasonNotJson Sep 18, 2023
d8d4a87
Merge branch 'master' into develop
JasonNotJson Sep 18, 2023
ff74bbb
fix: add Forum route to Root App.tsx
YHhaoareyou Sep 23, 2023
435da46
fix: add Forum routes with params in Root
YHhaoareyou Sep 23, 2023
fb5f8eb
chore: add Forum to sitemap
YHhaoareyou Sep 23, 2023
a2032a4
chore: test hard-coded subpath in Forum
YHhaoareyou Sep 23, 2023
4fea30d
fix: remove hard-coded path and add NotFound in Forum
YHhaoareyou Sep 23, 2023
eb75958
feat: adding images to forums (#460)
JasonNotJson Sep 24, 2023
5f0458e
feat: adding image indicator
JasonNotJson Sep 24, 2023
3e585fa
feat: adding boolean flag for page thread
JasonNotJson Sep 24, 2023
226e8c8
feat: forum-timstamp (#462)
JasonNotJson Sep 28, 2023
70a37d9
chore: fixing git merge conflict
JasonNotJson Sep 30, 2023
2a9f2c8
fix: fixing idToken retreaval function (#464)
JasonNotJson Oct 2, 2023
afb1172
fix: git merge conflict resolve for fixing non log in thread
JasonNotJson Oct 2, 2023
19bdc8b
fix: fixing feeds
JasonNotJson Oct 2, 2023
43ee9ab
feat: forum time formating with page thread formating (#466)
JasonNotJson Oct 2, 2023
991ae20
feat: disabling feeds and campus
JasonNotJson Oct 2, 2023
eefc380
fix: resolve git merge conflict for changed timestamp and image display
JasonNotJson Oct 2, 2023
f519b5a
fix:login failed error message and post direct url (#468)
Umar-Mughal Oct 3, 2023
4f5f584
feat: adding index html to forum src
JasonNotJson Oct 3, 2023
0f09e9c
feat: adding routing on index.html
JasonNotJson Oct 3, 2023
8cb48a4
feat: adding index html
JasonNotJson Oct 3, 2023
135d302
feat: forum redirect and styling (#472)
JasonNotJson Oct 4, 2023
c5e16de
fix: unifing border thickness
JasonNotJson Oct 4, 2023
55115e1
feat: adding index html for master
JasonNotJson Oct 4, 2023
f1833a4
feat: adding thread notification
JasonNotJson Oct 6, 2023
1a7df35
Merge branch 'master' into develop
JasonNotJson Oct 6, 2023
19bc081
feat: adding timeout to mobile nav bar notification
JasonNotJson Oct 6, 2023
060ce80
chore: getting rid of dirty code
JasonNotJson Oct 6, 2023
37ed0f5
Merge branch 'master' into develop
JasonNotJson Oct 6, 2023
0e75904
Feature/forum mobile UI (#483)
JasonNotJson Oct 9, 2023
fbb4ced
feat: changing the git actions yml
JasonNotJson Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
File renamed without changes.
54 changes: 45 additions & 9 deletions apps/forum/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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 (
Expand All @@ -35,13 +42,19 @@ const NotFound = () => {
};

const InnerApp = () => {
const location = useLocation();
const { t, i18n } = useTranslation();

const { theme, setTheme } = React.useContext(ThemeContext);
const [refresh, setRefresh] = useState(false);
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");
Expand Down Expand Up @@ -71,6 +84,10 @@ const InnerApp = () => {
storeDate();
}, []);

const handleFilterButtonClick = () => {
setFilterButtonClicked(!filterButtonClicked);
};

return (
<>
<div className="flex h-[67px] shrink-0 grow-0">
Expand All @@ -89,25 +106,44 @@ const InnerApp = () => {
commentNotify={commentNotify}
/>
</div>
<div className="flex flex-col h-fit md:mt-[23px]">
{/* <div className="basis-[calc(100vh-187px)] lg:basis-[80%] dark:text-dark-text1"> */}
<div className="flex justify-between pl-2 gap-4 h-[calc(100vh-100px)]">
<div className="flex flex-col w-1/5">
{/* <BreadCrumbs onTriggerFetch={handleTriggerFetch} /> */}
<div className="flex flex-col h-fit mt-[23px]">
<div className="flex justify-between pl-2 gap-4 h-[calc(100vh-150px)] md:h-[calc(100vh-100px)]">
<div className="left-side flex flex-col w-1/5">
<div className="pl-2 lg:pl-10">
<button
onClick={handleReset}
className="p-2 bg-light-main text-white rounded-lg my-1 w-full"
>
{/* <HomeIcon fontSize="large" /> */}
<ArrowBackIcon fontSize="large" />
</button>
</div>
<FilterMenu />
<BoardMenu />
<FeedBackBox />
</div>
<div className="flex flex-col md:w-3/5 w-4/5">
{!isThreadRoute && (
<button
className="filterButton p-2 bg-light-main dark:bg-dark-main text-white rounded-full"
onClick={handleFilterButtonClick}
>
<FilterAltIcon style={{ fontSize: "35px" }} />
</button>
)}
{filterButtonClicked && (
<div className="filterModal rounded-lg standard-style">
<button
onClick={handleReset}
className="p-2 bg-light-main text-white rounded-lg my-1 w-full"
>
<ArrowBackIcon fontSize="large" />
</button>
<FilterMenu />
<BoardMenu />
<FeedBackBox />
</div>
)}

<div className="flex flex-col md:w-3/5">
<Routes>
<Route
element={<Board triggerRefresh={refresh} setBoard={setBoard} />}
Expand Down
3 changes: 2 additions & 1 deletion apps/forum/src/components/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ const Board = ({ triggerRefresh, setBoard }: any) => {

return (
// <div className="max-w-2/5 w-5/6 mx-auto h-full">
<div className="mx-auto px-2 h-full lg:w-5/6 max-w-[280px] sm:max-w-[900px] standard-style overflow-y-hidden">

<div className="mx-auto px-2 h-full lg:w-5/6 max-w-[380px] md:maw-w-[700px] lg:max-w-[900px] standard-style overflow-y-hidden">
<CreateThread onNewThread={handleNewThread} />
<div
className="overflow-auto h-[calc(100%-150px)] mt-4 md:mt-8 lg:mt-12"
Expand Down
2 changes: 1 addition & 1 deletion apps/forum/src/components/BoardMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import boards from "@app/constants/boards.json";
const BoardMenu = () => {
return (
<div className="pl-2 md:pl-4 lg:pl-10">
<h1 className="form-item-title">Topics</h1>
<h3 className="form-item-title">Topics</h3>
<div className="flex flex-col sm:text-xl text-sm text-light-text1 text-light-text1 dark:text-dark-text1">
{boards.map((board, i) => (
<div
Expand Down
2 changes: 1 addition & 1 deletion apps/forum/src/components/FeedBackBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Props = {};
const FeedBackBox = (props: Props) => {
return (
<div className="pl-2 md:pl-4 lg:pl-10 overflow-y-auto">
<h1 className="form-item-title">Feedback</h1>
<h3 className="form-item-title">Feedback</h3>
<p className="text-light-text1 dark:text-dark-text1 ">
This is WasedaTime forum beta.
<br />
Expand Down
2 changes: 1 addition & 1 deletion apps/forum/src/components/FilterMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const FilterMenu = () => {
return (
<div className=" text-center pl-2 lg:pl-10">
<div className="my-2 mx-auto">
<h1 className="form-item-title">School</h1>
<h3 className="form-item-title">School</h3>
<button
className="w-full p-2 bg-light-main text-white rounded-lg my-1"
onClick={toggleSchoolFilter}
Expand Down
2 changes: 1 addition & 1 deletion apps/forum/src/components/Thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Thread = () => {
};

return (
<div className="border-2 w-full md:w-5/6 mx-auto rounded-xl shadow-lg py-6 px-4 standard-style max-w-[290px] sm:max-w-[900px] overflow-y-auto h-fit">
<div className="border-2 w-full md:w-5/6 mx-auto rounded-xl shadow-lg py-6 px-4 standard-style max-w-[390px] sm:max-w-[900px] overflow-y-auto h-fit">
{/* <CreateThread /> */}

<ThreadBlock isPreview={false} thread={thread} />
Expand Down
4 changes: 2 additions & 2 deletions apps/forum/src/components/ThreadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const ThreadBlock = ({ isPreview, fromRoot, thread, onDelete }: Props) => {
<div
className={
isPreview
? `border-2 mb-10 mr-4 rounded-xl shadow-lg p-6 standard-style-hover max-w-[290px] lg:max-w-[900px]`
? `border-2 mb-10 mr-4 rounded-xl shadow-lg p-6 standard-style-hover lg:max-w-[900px]`
: `cursor-default bg-light-card1 standard-style`
}
>
Expand Down Expand Up @@ -262,7 +262,7 @@ const ThreadBlock = ({ isPreview, fromRoot, thread, onDelete }: Props) => {
<div className="flex flex-row justify-evenly pt-2 items-center">
{/* The down panel that has like button, views in total, etc...*/}

<div className="flex flex-row items-center justify-center">
<div className="flex flex-row items-center justify-center gap-2">
<button onClick={handleLike} className="clipboard-icon group">
<Favorite
color={userLiked ? "error" : undefined}
Expand Down
2 changes: 1 addition & 1 deletion apps/forum/src/root.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { API } from "@aws-amplify/api";

import "@app/utils/i18n";
import "@app/styles/main.css";
// import "@app/styles/common.css";
import "@app/styles/common.css";

configAuth();

Expand Down
28 changes: 28 additions & 0 deletions apps/forum/src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,31 @@
filter: blur(2px);
border-radius: inherit; /* To maintain the same rounded corners as the parent */
}

@media (max-width: 600px) {
.left-side {
display: none !important;
}

.filterButton {
display: block !important;
}
}

.filterButton {
display: none;
justify-content: center;
align-items: center;
position: absolute;
bottom: 10%;
right: 5%;
}

.filterModal {
display: flex;
flex-direction: column;
width: 70%;
position: absolute;
left: 15%;
z-index: 99;
}
13 changes: 11 additions & 2 deletions apps/root/src/components/frame/MobileNav.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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) => (
<LinkOutsideRouter
Expand All @@ -34,7 +43,7 @@ const MobileNav = ({ navItems, openSignInModal }: Props) => {
<div className="text-lg text-light-text2 group-hover:text-light-main dark:text-dark-text2 dark:group-hover:text-dark-text1">
{item.name}
</div>
{item.tooltip && (
{item.tooltip && showTooltip && (
<span className="absolute top-0 left-1/2 z-10 -translate-x-1/2 -translate-y-full transform whitespace-nowrap rounded bg-light-main px-3 py-2 text-lg text-dark-text1 dark:bg-dark-main">
{item.tooltip}
</span>
Expand Down
Loading