-
Notifications
You must be signed in to change notification settings - Fork 4
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
React Frontend #205
React Frontend #205
Conversation
- also add bootstrap and react-bootstrap
- update navbar with target values ("_self" vs "_blank")
- also fix font in globals.css - fix semi-colon in _app.tsx - move unused construction image to public/ - make urls display green, with white hover
- to be deleted upon completion of frontend transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Biggest comment: I'm having trouble getting this to run (with docker-compose up --build
).
Generally for this (admittedly wonky) setup, I think we'll want to check in afidsvalidator-react/dist/index.js
so I can just clone and get it up and running. (Although we could build in the Dockerfile theoretically...). Anyway after building I get the console error:
Uncaught ReferenceError: currentUser is not defined
oi NavBar.tsx:67
<anonymous> index.ts:4
<anonymous> index.js:46
NavBar.tsx:67:12
I'd also install eslint
, eslint-plugin-react
, and prettier
, and add them to the CI. I'll send you an example .eslintrc
to get you going (but feel free to make any changes you'd like).
Once you've taken a stab at this stuff, I'll take another look.
afidsvalidator/static/lib/afidsvalidator-react/src/components/Footer.tsx
Outdated
Show resolved
Hide resolved
afidsvalidator/static/lib/afidsvalidator-react/src/components/Footer.tsx
Outdated
Show resolved
Hide resolved
afidsvalidator/static/lib/afidsvalidator-react/src/components/NavBar.tsx
Outdated
Show resolved
Hide resolved
afidsvalidator/static/lib/afidsvalidator-react/src/components/NavBar.tsx
Outdated
Show resolved
Hide resolved
afidsvalidator/static/lib/afidsvalidator-react/src/components/NavBar.tsx
Outdated
Show resolved
Hide resolved
- still need to pass along currentUser properly
- user auth - pass current_user.is_authenticated from backend to frontend bool param for navbar - linters - added eslint and typescript plugins - set up linters - add scripts for linting and formatting - performed linting on existing files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the react and templating stuff looks good to me, but I'd actually like to check in the dist
subdirectory of afidsvalidator-react
to make sure building from the github repository works properly
Proposed changes
Change to switch some of the frontend from pure HTML/CSS/JS to React+Typescript. Relatively minor changes here (primarily to the navbar and footer), but will be beneficial in the long run for building out an admin UI. Also fixes some visual discrepancies on the page.
One thing that needs to be checked / tested is the login/logout functionality since this was moved from Jinja (Flask) to React. Will also need to slightly change the deployment.
Types of changes
What types of changes does your code introduce? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!black
with the-l 79
flag.Notes
All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.
PR template was adopted from appium