-
Notifications
You must be signed in to change notification settings - Fork 135
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
Create Reference React #827
Conversation
aeda61f
to
095be93
Compare
modules/references/client/components/ReferencesNew.component.js
Outdated
Show resolved
Hide resolved
c61eb90
to
1807d9a
Compare
095dadc
to
252d1b2
Compare
252d1b2
to
0aed9f3
Compare
efda875
to
25540e7
Compare
0e44e6e
to
65ea41c
Compare
My comments looking at it at dev:
Logical:
|
|
65ea41c
to
1116c40
Compare
@petr-hajek I fixed your comments I was able to fix. Thank you for the feedback! 💚 Noted the rest for further discussion and iterations. Can be added to #718 and meta.trustroots.org. Note about feelings: I'm finding out that I'm most comfortable with implementing the functionality. I don't want to decide about UX, texts and appearance and I don't derive much pleasure from discussing it. I also suffer when dealing with css. It would be wonderful if there was somebody who enjoys doing these things. Do we have a trustroots style guide? |
1572ea5
to
2a72c4a
Compare
import axios from 'axios'; | ||
import set from 'lodash/set'; | ||
import get from 'lodash/get'; | ||
import has from 'lodash/has'; |
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.
Flagging for future work to make import { set, get, has } from 'lodash'
not to explode bundle size — as I expect this is a workaround for that?
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 found it in a text about bundle size. But I used it, because importing lodash directly was breaking tests including angular.
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.
Oh, funky!
We'll need to look into this more eventually.
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.
Nicely done!
🚢 after package.json
rebase.
dummy component designed by Mikael Korpela Co-authored-by: Mikael Korpela <[email protected]>
…etState(stateChange) - React.Component.setState(stateChange) performs a shallow merge of stateChange into the new state
- also added empty test files for each dummy subcomponent
- add div with class=checkbox around checkboxes (fix spacing and color) - disable tabs - reworded info about need to pick an interaction - add links to reference pages after the second reference is given
- mapper between deep and flat state - rename, simplify - fix tests to reflect the changes
2a72c4a
to
8318c6c
Compare
I'm merging. Still missing: the logic when only (Recommend: Yes) is allowed. That is - after the other direction reference is published already. |
Proposed Changes
Will need a replacement for angular-ui-bootstrap library.(react-bootstrap)Add React and an example component #790React #912 by @nicksellen.Currently work in progress.enzyme
(react test helper) andjasmine
(current client-side test framework).TODO
angular-ui-bootstrap
nicelysplit(wont do now)ReferencesNew.component
to smart and dummy componentshow(probably will do in different PR)Write a reference
link only if the reference doesn't exist alreadySorry, you cannot leave them a reference if you didn't have any previous interraction.
typo in the end (completely reworded)
Display only as tooltip for Next button. It is confusing for me, it seems like I am not allowed to access this page(just changed the wording to positive one)For the next iterations, design improvement points by @petr-hajek (I don't want to decide or figure out this) (may also require API changes):
Testing Instructions
Automated
npm run test:client
Manual
npm start
/profile/:username/references/new
Continued work on #718
Based and dependent on #912