-
Notifications
You must be signed in to change notification settings - Fork 6
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(double-check): Allow validation of imported annotations [ADEV-10] #191
Conversation
…ecated create-react-app (create / move / delete files)
…n following commits to try to keep history)
Redirect login already logged
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.
As I'm afraid to lose my comments: first part of the review (110 files viewed over 186).
Really good work, many things are cleaner than before! 👍
Most of my comments are questions or remarks, some things can be done later, don't feel that you have to change everything in this PR 🙂
frontend/index.html
Outdated
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Exo+2&display=swap" rel="stylesheet"> |
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.
I think it's better to download the fonts you want to use and to include them in our fonts
directory.
We don't want to depend on another website (which can be down or slow, even if it's Google), and people who don't want to be tracked by Google (fonts come with associated cookies) might filter Google CDN.
(Though, the "Roboto" folder might be cleaned, I don't think we need all those versions of the font)
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.
I understand, I'll will add it to the repo.
For "Roboto" I didn't find any use of this font files (in @font-face
) so maybe all of it should be removed?
return <div id="aplose-input" className="chips" aria-disabled={ disabled }> | ||
{ label && <p id="label" | ||
className={ required ? 'required' : '' }> | ||
{ label }{ required ? '*' : '' } | ||
</p> } |
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.
General comments as it applies to several files:
- You used
id
attribute which is supposed to appear only one time on a HTML document. As inputs can be used many times, I think the page won't be syntactically correct. - Why don't use
label
tag instead ofp
? It's semantically better.
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.
- I understand your concern about
id
attribute. I'll update it over time. - I'm not used to the
label
, that's why i didn't though of it. I'll change it.
- include Exo 2 font files - clean commented code - Use appropriate html tags instead of generic ones
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.
End of the review, but very few things to add 🙂
Once again, well done!
}) | ||
)); | ||
} catch (e) { | ||
console.debug('unrecognized file', e) |
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.
You used console.warn
earlier in the file, I think we can use it too here?
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.
For sure, and even better I should send the exact error to the view. I used it to debug the code but the original error could be useful for users too, to understand what went wrong precisely (ticket created for that)
frontend/src/types/user.ts
Outdated
// export class User { | ||
// id: number; | ||
// username: string; | ||
// email: string; | ||
// first_name: string; | ||
// last_name: string; | ||
// | ||
// constructor(data: { id: number, username: string, email: string, first_name: string, last_name: string }) { | ||
// this.id = data.id; | ||
// this.username = data.username; | ||
// this.email = data.email; | ||
// this.first_name = data.first_name; | ||
// this.last_name = data.last_name; | ||
// } | ||
// | ||
// get display_name(): string { | ||
// if (this.first_name && this.last_name) return `${ this.first_name } ${ this.last_name }`; | ||
// else return this.username; | ||
// } | ||
// } |
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.
You know the drill: is this still useful?
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.
Thanks for the remind ^^
I removed the interface to use this class. Globally, I'd like to replace a lot of interfaces that reprensent API data by object to simplify its use and common data transformation used around the app.
…k campaign [ADEV-100] Add detector name in detections list bloc (annotator)
…her than filename
request-checks: true
…and add force create route
# Conflicts: # backend/api/admin/__init__.py # frontend/index.html # frontend/package-lock.json # frontend/package.json # frontend/src/App.tsx # frontend/src/css/ionic-override.css # frontend/src/fonts/Exo_2/OFL.txt # frontend/src/fonts/Exo_2/README.txt # frontend/src/view/annotation-campaign-update/edit-annotation-campaign.page.tsx # frontend/src/view/audio-annotator/components/bloc/confidence-indicator-bloc.component.tsx # frontend/src/view/login.page.tsx # frontend/vite.config.ts
Automatic testing: