From 42e068ccc5239a719078497be2bef4a9b01ba3c3 Mon Sep 17 00:00:00 2001 From: Martin Benedikt Busch <43137759+MartinBenediktBusch@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:53:21 +0100 Subject: [PATCH] Remove institution field (#207) * Install & configure prettier * Update Readme * Remove initial unwanted code * Install styled-components * Install React Router * Install Formik + Yup * React Router setup * Change NPM to PNPM * Zupass poc (#4) * Zupass test (popup not working) * fix: zupass popup * zupass signature * Fetch nonce & Post pcdStr * Fix useEffect fetching twice the nonce * include credentials * fix cookies * fix nonce * add fetch users * fix tsc for build * add Popup with Pascal casing * Add env variables * Add solution for vercel deploy (test) * Add response.status checks --------- Co-authored-by: camilovegag * Landing page (#6) * Update global styles * Add new fonts * Create Header * Create Layout * Create Register Page (empty) * Remove pcdstr * Auth test (WIP) * Create Hero * Create Button * Improve zupass code organization * Implement zupass login button (nonce failing) * current changes * test * implement react query (#7) * Remove unused hooks and context (replaced by react query) * Clean up components and code * Improve redirection --------- Co-authored-by: Diego Alzate * Register page (#8) * Create draft register form * Add loading skeleton and conditional rendering based on user login status in Register page. * Create useUser hook & Add types to api calls * Improve form * Fix formatting (#9) * Add useUser hook to register * Update styled-components so prop warning doesn't show * Run pnpm format * Fetch and Post registrations * Change const to function * Improve login and logout redirects * Add select group dropdown options * Update arrow * Missing post (wip) * Fix postRegistration API and Register page to correctly handle group selection for proposals. * Registration page improvements (#11) * Refactor fetchRegistration, postRegistration, and Register component to use updated ProposalType type and add support for groupIds as array. * Update select name from group to groupId * autocomplete register page * Add disabled inputs, improve styles and Chip (pending color) --------- Co-authored-by: Diego Alzate * Add basic nav (#14) * Add registration options (#13) * Onboarding registration (#20) * Home page (#12) * Move FlexColumn & FlexRow to layout styled and create Grid * Create Option component * Create Home page & fetch options * Play with styles * Update styles * Landing updates (#21) * Change title font from Pixelify Sans to Press Start 2P * Update safe area width * Match hero with figma design * Replicate styles * Add zupass button * Update card icons * Home page updates (#22) * Changes to option card * Update logo * Finish card design * Global likes count, missing UI post update * Wizard of Oz for hearts now working (kinda) * Voting improvements (all local) * Update landing image * Update Register.tsx Update text for onboarding slides * Onboarding Updates + Logos (#26) * Update logo from 'Lexicon' to 'Plural MEV' * Create onboarding component * Add footer component to layout and adjust layout styles * Add logos to footer * Fix colors and input colors (#27) * Update copy (#30) * Update Logo * Update landing copy * Update onboarding copy * Change Hearths to Hearts * Improve mobile friendliness * Fetch dummy options * Update copy + options.json * add .env skeleton and readme with getting started (#32) * Home api connection (#33) * Improve api types * Update error message * Remove min-height from option card * Update useCountdown so it works with ISO strings * Update type with latest backend changes 'question' -> 'forumQuestion' * Create postVote function * Create logic for vote and saving to db (wip) * Current changes * POC mutate hearts (error at avaliable hearts) * Fix heart interaction * Change queryClient import to useQueryClient hook * Add react-hot-toast * Add toast to home * Dynamic register page (#36) * Refactor registration field required property (#38) This commit refactors the code to update the property name from "isRequired" to "required" in the RegisterForm component and the RegistrationFieldType type. This change aligns with the naming convention used in other parts of the codebase. * Migrate from react-hook-form to Tanstack form (#42) * Add zustand to package.json and create a global store * Fix home page (#44) * Add useMemo hook to optimize rendering (#45) * Account page (#43) * Initial account page commit * Add account to router and nav * Create form account structure * Create updateUserData PUT request * Fetch user groups & add Toast * Add submit button validation * Add flow to /register * Add flow to /home * Move toast to layout & add email validation * Add fetchForumQuestionStatistics API (#49) * Events page (#50) * Current events changes * Refactor fetchCycle to use ResponseCycleType, add fetchEventCycles to API * Refactor onboarding flow and remove temporary registration status * Update routes and add fetchEvent function * Refactor user registration flow and fix navigation * Add Results page * Refactor navigation and add results button This commit refactors the navigation in the App and Header components to use the `Navigate` component from React Router instead of the `navigate` function. It also adds a "Results" button in the Vote component that navigates to the results page. These changes improve the user experience and make the code more readable and maintainable. * Create Event page * Remove Results button and add "see results" link --------- Co-authored-by: Diego Alzate * Results page (#51) * Current events changes * Refactor fetchCycle to use ResponseCycleType, add fetchEventCycles to API * Refactor onboarding flow and remove temporary registration status * Update routes and add fetchEvent function * Refactor user registration flow and fix navigation * Add Results page * Refactor navigation and add results button This commit refactors the navigation in the App and Header components to use the `Navigate` component from React Router instead of the `navigate` function. It also adds a "Results" button in the Vote component that navigates to the results page. These changes improve the user experience and make the code more readable and maintainable. * Create Event page * Remove Results button and add "see results" link * Fix hex color * Update Results page with queried statistics * Add icons * Add results leaderboard --------- Co-authored-by: Diego Alzate * Update queryKey in Event component (#55) * Remove commented out code and display event description (#53) * Rename groups to affiliation (#54) * Update label text from "Group" to "Affiliation" in Account.tsx * Update Account.tsx * Design system typography (#56) * Create typography components * Update Card & add Title and Subtitle * Update Types * Add title to Vote page * Update chip * Change green color * Update even more titles * Demo updates (#57) * Changes Plural MEV to Plural Research * Add images * Viewport height update + Logo cursor * Update zuzalu image * Implement back arrow * Sort question options by vote count in Vote.tsx (#60) * Add user attributes (#59) * Add fetchUserAttributes function and updateUserData to handle user attributes * Update form field labels to include "required" attribute * Update Account page with new fields * Demo new changes (#58) * Refactor imagePicker function and update image paths (#61) * Update diasbled styles (#62) * Decrease img size (#63) * Update query keys in Event and Vote components * Update images * Update landing.ts Changes to landing page * Update landing.ts * Update Event.tsx (#64) Change cycles to vote * Design system (#76) * Update package.json version to 0.1.1 * Revamp account registration (#79) * Migrate from tanstack to react-hook-form * Add credentialsGroup to userAttributes * Add useForm and useFieldArray hooks to Account component * Fix logout queryClient method * Update placeholders for institution and field inputs, and add placeholders for publications and contributions inputs * Update institution placeholder in AccountForm * Fix typo in page title * Update background image path in Select component * Update onboarding.ts (#81) * Update onboarding.ts Updates to onboarding text * Update onboarding.ts Fixed id numbers * Create searchable select component (#84) * Add Subtitle component to Register page (#83) * Add Subtitle component to Register page * Update registration description in RegisterForm * Integrate Searchable select with account registration * Revert "Integrate Searchable select with account registration" This reverts commit 1387ab034c1ef8ce4b10986526f3688a9421a854. * adjust table names due to breaking backend changes * Integrate Searchable select with account registration (#88) * Integrate Searchable select with account registration * Add onOptionCreate prop to AccountForm component * sort registration fields * fix camel case issue * Setup monorepo (#95) * Berlin first update (#87) * Update fonts * Add logo * Create new layout * Crete new App * Create new global styles * Add styles, layout and app to main.tsx * Create landing page skeleton * Create button * Create nav button * Create Header & Footer * Update button * Make button uppercase * Update header * Update nav button * Zupass button (wip) * Update footer layout * Fix font mix * Add $gap * Update Copy * Add dark mode toggle to app * Improve themed icons * Button enhancements * Organize files * Discard changes to other files * Bring back old public folder * Monorepo for frontend * Update start command in README.md * Update README.md with more specific instructions for creating .env.local --------- Co-authored-by: Camilo Vega <59750365+camilovegag@users.noreply.github.com> * Add favicon * Remove pushed commit * Header breakpoints (#96) * Add berlin favicon * Add burger icon svgs * Add general transitions to buttons * Add header breakpoints * Landing updates (#98) * add character validation option * add real time character count * Berlin onboarding (#101) * Create dots component * Add gray to global styles * Update typography * Create onboarding page * Add onboarding page to router * Fix data 'Guiding Principles' * Remove cookie setter * add darker gray font and overlapping error message * registration multiple urls (#105) * Update rewrite destination in vercel.json * Update vercel.json rewrite destination * Add Vercel configuration files * Refactor code to improve performance and readability * Update packages/core/src/pages/Account.tsx Co-authored-by: Martin Benedikt Busch <43137759+MartinBenediktBusch@users.noreply.github.com> --------- Co-authored-by: Martin Benedikt Busch <43137759+MartinBenediktBusch@users.noreply.github.com> * change naming and remove other option * Berlin input component + initial account page (#103) * Fix theme * Create label and error typography * Create input component * Create Account page * Add account page to router * Update menu icon * Add 100% witdh to Flex containers * Set default alignment to flex-start * Add $justify prop * Formatting changes * Add themed arrow icons * Create select component * Add account inputs & selects * fix autofill and validation * Connect berlin account page (#108) * Add new types and components * Refactor Input component to use TypeScript interface * Remove defaultValue prop from Input component * CORE: update user flow (#102) * fix: logout not working as expected * Add fetchEvents API call and events prop to AccountForm * Update label for account credentials to academic credentials * Connect user flow to berlin (#109) * Add user authentication and onboarding flow * Update Header component and logout functionality * Update routes in App component * Register page (#110) * Wip * Update Register import in App.tsx * Refactor routes and add event registration * Update layout and remove button * Add label and required attributes to input and select components * Add error message to TextInput component * Update form width in Register page --------- Co-authored-by: Diego Alzate * Berlin/move role field (#115) * Update select component structure * Move role to its place * Update Account.tsx (#112) * Update Account.tsx Small text updates to account registration page * Update Account.tsx * add character validation for berlin * replicate academic credentials PR * sort group options alphabetically * implement sorting in core * change color contrast * change default theme to dark * api package (#104) * Add API package and types and connect to core site * Update dependencies and import paths * Update import statement in ZupassLoginButton.tsx * Update font (#130) * Update index.html google font import * Change title & body font from Playfair to EB Garamond * Header updates (#132) * Update logo * Update header title and subtitle * Update alt text * add typography component and adjust font size * simplify logic and wrap into a function * adjust style * change export style * improve readability * Onboarding enhancements (#133) * Update data structure * Adjust Body rendering * Icon button component (#134) * Create component structure * Update button type and enable passing {...props} * Update IconButton and pass padding as inline styles * Organize imports + replace trash button with icon button * Add new icons * Update icons * Remove padding * Improve layout & replace button with icon button * Fix errors rendering on input * Remove unused FlexColumn * Add accademic to label * Add onChange * Update placeholder * Improve zupass login (#131) * Refactor ZupassLoginButton component and remove handleSignatureRequest utility * Refactor postPcdStr function and mutateVerify call * Remove fetchNonce and update dependencies in ZupassLoginButton * fix registration fields response * add holding page * add text * Refactor navigation routes in App component (#140) * redirect users and implement link on holding page * check that user is logged in and connect holding page to an event * reload registration page to ensure data is up to date when re directed * fix typo in header * Refactor userAttributes mapping in Account.tsx (#143) * move import to correct location * implement title * implemented changes * implement formating consistent with backend * implement linter consistent with backend * Zupass here Link at landing page (#136) * Add variant prop to button * Add variant prop to zupass button * Add zupass button with link variant to landing page * implement formating and linting workflows * require node v20 * update dependencies * fix formating * allow any type * fix linting * remove core and berlin lint * Burger menu (#141) * Burger menu implementation * Create custom burger icon with closing animation * Remove unused menu icons * Fix bug + onclick type * Remove void from function * Add () => to onClick for mutateLogout() * add back env property * move ignored files to .eslint.cjs * warn if there are any types * turn on linting rules * add rule explanation * fix validation * Update Landing.tsx Small changes to landing page text. Feedback and adaptation links removed until #145 is resolved * Implement dot navigation (#159) * fix linting * Account page improvements (#156) * Fix text overlaping select arrow * Update button types * Create mobile flex row * Add mobile flex row * Add flex row to column * Remove unused flex row * Fix overlaping placeholder * remove required flag from publications and mev * simpliefied code * Modify data structure and onboarding rendering (#164) * Remove display grid, make texts bigger (#165) * Remove registration title * fix reload * Checkout component for email notifications (#152) * First checkout iteration * Add name and email notification fields to user type and update checkbox component * Create textarea component * Organize imports * Refactor Textarea component and add TextAreaInput component --------- Co-authored-by: Diego Alzate * fix credentail validation (#171) * Change logo.png asset (#180) * 177 change subtitle (#179) * Create header data file * Update styled components naming to match data file * Add data file * 172 character count resets to 0 low priority (#175) * Fix character count set * Add nullish coalescing operator to value * updated dependency array --------- Co-authored-by: Martin Benedikt Busch * Update header styles with new breakpoint at 414px (#182) * change name placeholder (#185) * Add useQuery hook for fetching events and update navigation logic (#183) * Update Landing.tsx (#190) Update date and small formatting change * Update onboarding.ts (#187) Updates to onboarding slides * Update Holding.tsx (#188) Update to holding page text * Store other group affiliations (#192) * Add dev dependency and update form in Account page * Remove DevTool component from AccountForm * Remove unused import * Remove email notification checkbox from AccountForm * Add custom group functionality to AccountForm * Update logo asset with #222 as background color (#197) * add page reload (#196) * add conditonal rendering if value exists (#195) * Update Landing.tsx (#202) * Update Landing.tsx Update landing page text * Update Landing.tsx * Diego/replace logos (#204) * Remove unused import and update logo images in Footer component * Add links to footer icons * Add new logos and update image source in Footer component * Update logos * Refactor AccountForm component to improve readability and fix conditional rendering bug (#205) * Display subtitle on mobile devices (#206) * remove institution field --------- Co-authored-by: camilovegag Co-authored-by: Diego Alzate Co-authored-by: Camilo Vega <59750365+camilovegag@users.noreply.github.com> Co-authored-by: thewanderingeditor Co-authored-by: lexicon-admin <150657043+lexicon-admin@users.noreply.github.com> --- packages/berlin/src/pages/Account.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/berlin/src/pages/Account.tsx b/packages/berlin/src/pages/Account.tsx index f826575c..fa9ed5ac 100644 --- a/packages/berlin/src/pages/Account.tsx +++ b/packages/berlin/src/pages/Account.tsx @@ -45,7 +45,6 @@ type CredentialsGroup = { }[]; type UserAttributes = { - institution: string; role: string; customGroupName?: string; publications: { value: string }[]; @@ -116,7 +115,6 @@ function Account() { } }, { - institution: '', role: '', publications: [{ value: '' }], contributions: [{ value: '' }],