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

Antti/frontend #27

Merged
merged 115 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
4e23abf
Changed interactive-widget value
anttiasmala Apr 27, 2024
97d4d06
Removed unnecessary lines and added a small circle placeholder for logo
anttiasmala Apr 27, 2024
712a95f
Added rounded value to input
anttiasmala Apr 27, 2024
5392df3
Added some color styling
anttiasmala Apr 27, 2024
7388ad7
Added rounding to the Button
anttiasmala Apr 27, 2024
1ad480d
Added a group value for password. Added text-center so registering te…
anttiasmala Apr 27, 2024
a1ad9ef
Merged main branch into antti/frontend
anttiasmala May 29, 2024
33197f4
Added logo with text and without text. Added the source of image into…
anttiasmala May 29, 2024
39b0c1c
Change blue circle to the logo. Added some logic to make image follow…
anttiasmala May 29, 2024
c2dbeda
Added password eye icon's default color to be white so it matches res…
anttiasmala May 29, 2024
cf0423b
Added select-none to make the logo feel like a 'real logo'
anttiasmala May 29, 2024
aeb9cd8
Changed Button.tsx's bg color to match greenish color style. Now the …
anttiasmala May 29, 2024
cc5aff8
Changed input's border color to be black
anttiasmala May 29, 2024
1787e32
changed interactive-widget in _app.tsx for now
anttiasmala May 30, 2024
a84b533
Created a page for logging out. Added some frontend code there. Feedb…
anttiasmala May 30, 2024
d9f428f
Changed receiver's and gift's input location
anttiasmala May 30, 2024
4a9daba
Added some styling to register page
anttiasmala May 30, 2024
815e8a9
Fixed 'No img element' error that Next.js gave. Reference: https://ne…
anttiasmala May 30, 2024
14e62f7
Created a component from Logo. Changed old logo styles to use the Log…
anttiasmala May 30, 2024
6dcb3a8
ESLint fixes
anttiasmala May 30, 2024
fb04e6d
Started to do feedback branch in this branch which is complitely wron…
anttiasmala Jun 6, 2024
e2f76ca
Revert "Started to do feedback branch in this branch which is complit…
anttiasmala Jun 6, 2024
1cf1e2a
Merged main branch into antti/frontend
anttiasmala Jun 13, 2024
763dc53
Deleted logo_with_text.png because of it does not have usage
anttiasmala Jun 13, 2024
d549a81
Changed logout buttons color and added some rounding to make it better
anttiasmala Jun 13, 2024
ef83d95
Added the colors that are used in this project into tailwind.config.t…
anttiasmala Jun 17, 2024
e629d7a
Created a new file utils/fonts.ts for fonts used at project
anttiasmala Jun 17, 2024
f8a22db
Created a new file components/Label.tsx. Label texts are used in mult…
anttiasmala Jun 17, 2024
351291b
Changed label elements to use Label components. Added some fonts and …
anttiasmala Jun 17, 2024
4b938d3
Label component is now label instead of input
anttiasmala Jun 17, 2024
b3f5d99
Changed border color, default background color and hover color to mat…
anttiasmala Jun 17, 2024
9271cab
Changed colors and added some coloring changes and some outlining cha…
anttiasmala Jun 17, 2024
6faccb5
Changed border color and hovering color in components/Input.tsx
anttiasmala Jun 17, 2024
acbfe17
Changed no account text a bit
anttiasmala Jun 19, 2024
e6c1db7
Added pb-1 into components/Label.tsx
anttiasmala Jun 20, 2024
83510ff
Removed pb-12 from Kirjaudu Sisään's text
anttiasmala Jun 20, 2024
648a19b
Changed page color in pages/register.tsx
anttiasmala Jun 20, 2024
46fdfd5
Changed _document.tsx body's color to bg-bgPage so that color does no…
anttiasmala Jun 20, 2024
0a7ba24
Removed bg-bgPage color fropm main element. Changed label elements to…
anttiasmala Jun 20, 2024
9b681f5
Copied Password styling from pages/login.tsx
anttiasmala Jun 20, 2024
89a4b9c
Added text-center attribute and lowered pt-6 to pt-3
anttiasmala Jun 20, 2024
68a04d3
Changed margin to padding. And lowered the value from 6 to 3 in login…
anttiasmala Jun 20, 2024
5886c2b
Changed pb-1 to pb-2 in Label.tsx
anttiasmala Jun 20, 2024
097a010
Added more styling changes into login.tsx
anttiasmala Jun 20, 2024
e9aaef5
Added libre_bodoni font and text-center style into TitleText element.…
anttiasmala Jun 20, 2024
79faa5f
Removed unnecessary className from TitleText component in pages/regis…
anttiasmala Jun 20, 2024
e036acf
ESLint fixes
anttiasmala Jun 21, 2024
566880e
Renamed icons' names
anttiasmala Jun 24, 2024
1f6cf56
Added pencil_edit.svg logo and created .tsx file of it
anttiasmala Jun 24, 2024
60a7533
Updated imports and mage svg files to tsx again
anttiasmala Jun 24, 2024
f5789bc
Added --ignore-existing to not overwrite already existing .tsx files.…
anttiasmala Jun 24, 2024
52f4ec6
Updated user icon to match that is in Figma
anttiasmala Jun 24, 2024
eab6968
Changed 'Lahjalistaidea' header-bar color and changed that the 'Lahja…
anttiasmala Jun 24, 2024
ee18821
Added a trash can svg and created .tsx file of it
anttiasmala Jun 24, 2024
224db31
Removed edit and delete buttons and added pencil icon for editing. Tr…
anttiasmala Jun 24, 2024
0636bdf
Did a lot of changes. Changed edit and delete buttons to be icons ins…
anttiasmala Jun 24, 2024
7adef3e
Removed div wrappers and added some line-through styling to show whic…
anttiasmala Jun 24, 2024
5cd3617
Changed trash can and pencil icons to be in same grid slot to make it…
anttiasmala Jun 24, 2024
5d43d54
Changed e.g. w-6 to width={24} etc, and re-styled the user icon at th…
anttiasmala Jun 24, 2024
fefdf1c
Added 'X-close' SVG image and created the .tsx file of it
anttiasmala Jun 24, 2024
868c1c6
Added some styling to EditModal and Modal. It is not finished yet
anttiasmala Jun 24, 2024
c38cb24
ESLint fixes
anttiasmala Jun 24, 2024
0fbc01f
Some more styling changes
anttiasmala Jun 25, 2024
aca6c0e
Changed ps-1 to pl-2 in components/Input.tsx
anttiasmala Jun 25, 2024
1209d46
Added some styling by adding mostly margins
anttiasmala Jun 25, 2024
3c0f13d
Changed text that is shown when deleting and changed gift's and recei…
anttiasmala Jun 25, 2024
f7f85c1
Changed pt to mt in components/TitleText.tsx
anttiasmala Jun 25, 2024
a0c4d77
Added a new colors value primaryText that should be used in most scen…
anttiasmala Jun 25, 2024
1ba43b8
Styling changes
anttiasmala Jun 28, 2024
d32b90b
Styling changes to components/DeleteModal.tsx to follow Figma
anttiasmala Jun 28, 2024
c7f5e2c
Changed login button's text and did some more styling changes in page…
anttiasmala Jun 28, 2024
92badcf
Added a className possibility to all of the elements in components/Lo…
anttiasmala Jun 28, 2024
914c3ea
Removed onHover styling. Should not be needed due to Inputs do have a…
anttiasmala Jun 28, 2024
23f36c5
Installed packages to new computer
anttiasmala Jul 8, 2024
777db0a
Finished register.tsx
anttiasmala Jul 8, 2024
683875e
Removed bg-orange-50 from rest of the files
anttiasmala Jul 8, 2024
2656813
Edited some styling in pages/index.tsx and in some components
anttiasmala Jul 8, 2024
bf3a3f4
ESLint fixes
anttiasmala Jul 8, 2024
ba05ad5
Created a CSS class to make password mask character a little bit bigg…
anttiasmala Jul 11, 2024
3ea6821
Changed the logout arrow icon to match the Figma's icon
anttiasmala Jul 11, 2024
c637a51
Changed background color to match Figma
anttiasmala Jul 11, 2024
fa23684
Changed text stroke width to be 0.2rem instead of 0.1
anttiasmala Jul 12, 2024
7dd1f5c
Added some changes to UserDetailModal
anttiasmala Jul 12, 2024
b8e95b3
Changed width of main wrapper. Changed some styling
anttiasmala Jul 12, 2024
b0a5e84
Changed w-72 to have max-w-72 so it can be smaller than that. Added p…
anttiasmala Jul 12, 2024
5c55f86
Changed paddings to margins and did small styling changes in pages/re…
anttiasmala Jul 12, 2024
6f055f0
Removed font-bold in components/EditModal.tsx
anttiasmala Jul 12, 2024
69379c8
Created a new div-wrapper to set max-width for form-element. Changed …
anttiasmala Jul 12, 2024
e0f36ab
Removed text-s text inside the classname of Button components
anttiasmala Jul 12, 2024
505ae90
Changed Lahjaideat's text size to a littlebit smaller. Changed text c…
anttiasmala Jul 12, 2024
4a5d035
Decided to change the stroke width to just use the Arial font. It sho…
anttiasmala Jul 15, 2024
d515cbb
Changed input-enlarge-mask-character-size CSS selector to input-enlar…
anttiasmala Jul 18, 2024
d9e15b6
Changed the text fonts and made texts a bit more light colored in pag…
anttiasmala Jul 22, 2024
9419c9e
Changed fonts in Label.tsx and register.tsx. Changed text as well a l…
anttiasmala Jul 22, 2024
86052d1
changed button sizes and text sizes in EditModal.tsx
anttiasmala Jul 22, 2024
ffb5921
ESLint fixes
anttiasmala Jul 22, 2024
283c8a4
When logging out now user will be redirected to the page where they c…
anttiasmala Jul 26, 2024
f9b4ebf
Removed the height styling from the main div-wrapper of user modal so…
anttiasmala Jul 26, 2024
2044134
ESLint fixes
anttiasmala Jul 26, 2024
640a986
Added tailwindcss plugin to .pretteirrc file so now it will make the …
anttiasmala Jul 26, 2024
811d25c
Ran npm run lint:fix command after adding the tailwindcss plugin into…
anttiasmala Jul 26, 2024
abe55fb
Changed Div-element to be the Button-element
anttiasmala Jul 31, 2024
f1fff85
Removed unnecessary hover:cursor-pointer attribute in className. Remo…
anttiasmala Jul 31, 2024
7118979
Ran tailwindcss prettier plugin
anttiasmala Aug 12, 2024
6d1d1f2
Updated small packages
anttiasmala Aug 23, 2024
ce492a1
Changed stroke to be currentColor instead of white color
anttiasmala Sep 1, 2024
fea8a04
Removed stroke-white value from className due to it has no usage
anttiasmala Sep 1, 2024
37d96cf
Deleted shared/isValidFunctions.ts file due to no usage
anttiasmala Sep 1, 2024
f67e457
Removed roboto_mono font, kept inter still due to it is used in two p…
anttiasmala Sep 2, 2024
fed9cc5
Changed default font to be Jost. Removed Jost fonts that are not need…
anttiasmala Sep 2, 2024
087bf01
Removed unused import
anttiasmala Sep 2, 2024
3176010
Deleted components/InfoModal.tsx, not in use
anttiasmala Sep 2, 2024
f91619a
Removed Inter font in /utils/font.ts. It is not in use anymore
anttiasmala Sep 2, 2024
25c2559
Updated eslint-config-next package and lowered typescript to version …
anttiasmala Sep 2, 2024
582ce72
Changed rest of the SVG images to have currentColor instead of some o…
anttiasmala Sep 2, 2024
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
22 changes: 0 additions & 22 deletions components/InfoModal.tsx
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

2 changes: 1 addition & 1 deletion icons/pencil_edit.tsx
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const SvgPencilEdit = (props: SVGProps<SVGSVGElement>) => (
{...props}
>
<path
stroke="#594F47"
stroke="currentColor"
strokeWidth={1.5}
d="m12 5.5 3 3-9 9H3v-3zM14 3.5l3 3 1.293-1.293a1 1 0 0 0 0-1.414l-1.586-1.586a1 1 0 0 0-1.414 0z"
clipRule="evenodd"
Expand Down
4 changes: 2 additions & 2 deletions icons/trash_can.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const SvgTrashCan = (props: SVGProps<SVGSVGElement>) => (
{...props}
>
<path
stroke="#594F47"
stroke="currentColor"
strokeWidth={1.5}
d="M5 5.5h10v12H5z"
clipRule="evenodd"
/>
<path
stroke="#594F47"
stroke="currentColor"
strokeWidth={1.5}
d="M2 5.5h16M8 8.5v6M12 8.5v6M8 5.5v-3h4v3"
/>
Expand Down
2 changes: 1 addition & 1 deletion icons/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const SvgUser = (props: SVGProps<SVGSVGElement>) => (
{...props}
>
<path
stroke="#404040"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
Expand Down
2 changes: 1 addition & 1 deletion icons/x_close.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const SvgXClose = (props: SVGProps<SVGSVGElement>) => (
{...props}
>
<path
stroke="#594F47"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"bcrypt": "5.1.1",
"dotenv": "16.4.5",
"eslint": "8.57.0",
"eslint-config-next": "14.2.6",
"eslint-config-next": "14.2.7",
"lucia": "3.2.0",
"next": "14.2.6",
"oslo": "1.2.1",
Expand All @@ -42,7 +42,7 @@
"sharp": "0.33.3",
"tailwind-merge": "2.5.2",
"tailwindcss": "3.4.10",
"typescript": "5.5.4",
"typescript": "5.4.5",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiputin Typescriptin version 5.5.4 -> 5.4.5. Tuo oli viimeisin kunnon päivitys, joka ei ollut >5.5.0. npmjs.com:n lista

Ajaessa npm run lint:fix tai npm run lint tuli tämmöinen virheilmoitus:

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.5.0

YOUR TYPESCRIPT VERSION: 5.5.4

Please only submit bug reports when using the officially supported version.

=============

Ei ollut apua vaikka @typescript-eslint/typescript-estree-paketin asensikin, sama virheilmoitus.

Sitten seuraava ongelma koskee ESLint 9:iä. Eli kun ESLintin päivittää (8.57.0 -> 9.9.1) tulee seuraava ongelma:

Could not resolve dependency: peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from eslint-plugin-import@2.29.1 node_modules/eslint-plugin-import dev eslint-plugin-import@"2.29.1" from the root project

Tätäkään en saanut korjattua

Myöskin ESLint 9:n ja Next Lintin kanssa on ollut hiukan ongelmaa vercel/next.js#64409

eslint-config-next-paketille oli tullut päivitys, mutta kyseisestä päivityksestä en löytänyt tietoa

Onko siis ihan ok mennä tällä tavalla nyt eteenpäin?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Koska Next.js ei vielä tue eslint v9, niin tuo mitä teit on paras ratkaisu.

Sitten seuraava ongelma koskee ESLint 9:iä. Eli kun ESLintin päivittää (8.57.0 -> 9.9.1) tulee seuraava ongelma:

Could not resolve dependency: peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from eslint-plugin-import@2.29.1 node_modules/eslint-plugin-import dev eslint-plugin-import@"2.29.1" from the root project

Tätäkään en saanut korjattua

Sitä ei oikein saakaan, kun ainakaan eslint-plugin-import ei tue vielä lainkaan eslint v9. Eli käytetään eslint v8 ja tuo TypeScriptin versio kunnes v9 tuki laajenee.

"zod": "3.23.8"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions pages/index.tsx
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function Home({
<SvgUser
width={24}
height={24}
className={`cursor-pointer hover:stroke-yellow-600 ${showUserWindow ? 'stroke-yellow-600' : ''} z-[98] mr-4`}
className={`z-[98] mr-4 cursor-pointer text-stone-600`}
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved
onClick={() => setShowUserWindow((prevValue) => !prevValue)}
/>
<UserDetailModal
Expand Down Expand Up @@ -177,7 +177,7 @@ export default function Home({
key={`${giftItem.uuid}_editbutton`}
width={24}
height={24}
className="trigger-underline col-start-2 row-start-1 mr-8 justify-self-end align-middle hover:cursor-pointer"
className="trigger-underline col-start-2 row-start-1 mr-8 justify-self-end align-middle text-stone-600 hover:cursor-pointer"
onClick={() => {
setEditModalGiftData(giftItem);
setIsEditModalOpen(true);
Expand All @@ -188,7 +188,7 @@ export default function Home({
key={`${giftItem.uuid}_deletebutton`}
width={24}
height={24}
className="trigger-line-through col-start-2 row-start-1 justify-self-end align-middle hover:cursor-pointer"
className="trigger-line-through col-start-2 row-start-1 justify-self-end align-middle text-stone-600 hover:cursor-pointer"
onClick={() => {
setDeleteModalGiftData(giftItem);
setIsDeleteModalOpen(true);
Expand Down
3 changes: 1 addition & 2 deletions pages/login.tsx
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import SvgEyeSlash from '~/icons/eye_slash';
import { UserLoginDetails } from '~/shared/types';
import { handleAuthErrors } from '~/utils/handleError';
import { emailSchema } from '~/shared/zodSchemas';
import { inter } from '~/utils/fonts';
import { Label } from '~/components/Label';

export async function getServerSideProps(context: GetServerSidePropsContext) {
Expand Down Expand Up @@ -129,7 +128,7 @@ export default function Login() {
Ei vielä tunnuksia?{' '}
<Link
href={'/register'}
className={`cursor-pointer underline hover:text-blue-500 ${inter.className}`}
className={`cursor-pointer underline hover:text-blue-500`}
>
Luo tunnus
</Link>
Expand Down
3 changes: 1 addition & 2 deletions pages/register.tsx
samuliasmala marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import SvgEyeOpen from '~/icons/eye_open';
import SvgEyeSlash from '~/icons/eye_slash';
import { formSchema } from '~/shared/zodSchemas';
import { Label } from '~/components/Label';
import { inter } from '~/utils/fonts';

type ErrorFieldNames = 'firstName' | 'lastName' | 'email' | 'password';

Expand Down Expand Up @@ -164,7 +163,7 @@ export default function Register() {
Onko sinulla jo tunnus?{' '}
<Link
href={'/login'}
className={`cursor-pointer underline hover:text-blue-500 ${inter.className}`}
className={`cursor-pointer underline hover:text-blue-500`}
>
Kirjaudu sisään
</Link>
Expand Down
7 changes: 1 addition & 6 deletions utils/fonts.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { Inter, Jost, Libre_Bodoni, Roboto_Mono } from 'next/font/google';

export const inter = Inter({
subsets: ['latin'],
display: 'swap',
});
import { Jost, Libre_Bodoni } from 'next/font/google';

export const libre_bodoni = Libre_Bodoni({
subsets: ['latin'],
Expand Down
Loading