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

Create Reference React #827

Merged
merged 21 commits into from
Dec 17, 2018
Merged

Create Reference React #827

merged 21 commits into from
Dec 17, 2018

Conversation

mrkvon
Copy link
Contributor

@mrkvon mrkvon commented Nov 12, 2018

Proposed Changes

TODO

  • replace angular-ui-bootstrap nicely
  • split ReferencesNew.component to smart and dummy component (wont do now)
  • hide behind flags
  • show Write a reference link only if the reference doesn't exist already (probably will do in different PR)
  • design looks and info
  • fix issues from feedback
    • add some space between the checkbox and text in How do you know them? and next to report checkbox
    • Either make the tabs clickable like the next/back button or not display them as links
    • Sorry, 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)
    • Make the text next to checkboxes black not gray. It looks like it is disabled.
    • Move the link to your reference in the success display to Your reference for x y is public now. It will look more clear.

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):

  • Recommendation does not make much sense to me. That does not help me much if I see it in someone's profile. CS also dropped the neutral reference.

  • Met in person is little unclear to me. If it is for cases when I know someone from elsewhere than hosting it maybe should have little different name

Testing Instructions

Automated
  • npm run test:client
Manual
  • npm start
  • Go to /profile/:username/references/new

Continued work on #718
Based and dependent on #912

@mrkvon mrkvon force-pushed the references-create-react branch 2 times, most recently from aeda61f to 095be93 Compare November 13, 2018 18:31
@mrkvon mrkvon force-pushed the references-create-react branch from c61eb90 to 1807d9a Compare November 16, 2018 16:35
@mrkvon mrkvon force-pushed the references-create-react branch from 095dadc to 252d1b2 Compare November 18, 2018 02:42
@guaka guaka removed the in progress label Nov 21, 2018
@mrkvon mrkvon changed the base branch from react to master December 2, 2018 22:46
@mrkvon mrkvon force-pushed the references-create-react branch from 252d1b2 to 0aed9f3 Compare December 2, 2018 23:13
@mrkvon mrkvon changed the base branch from master to react December 5, 2018 14:51
@mrkvon mrkvon force-pushed the references-create-react branch from efda875 to 25540e7 Compare December 5, 2018 15:00
@mrkvon mrkvon changed the title [WIP] Create Reference React Create Reference React Dec 5, 2018
@mrkvon mrkvon changed the base branch from react to master December 7, 2018 15:29
@mrkvon mrkvon force-pushed the references-create-react branch from 0e44e6e to 65ea41c Compare December 7, 2018 15:33
@mrkvon mrkvon added the React label Dec 8, 2018
@petr-hajek
Copy link
Contributor

petr-hajek commented Dec 10, 2018

My comments looking at it at dev:
Cosmetic (can be later iteration):

  • add some space between the checkbox and text in How do you know them? and next to report checkbox
  • Either make the tabs clickable like the next/back button or not display them as links

Logical:

  • I don't know recommendation does not make much sense to me. That does not help me much if I see it in someone's profile. CS also dropped the neutral reference.
  • Met in person is little unclear to me. If it is for cases when I know someone from elsewhere than hosting it maybe should have little different name

@petr-hajek
Copy link
Contributor

petr-hajek commented Dec 13, 2018

Sorry, you cannot leave them a reference if you didn't have any previous interraction.

  • typo in the end
  • Display only as tooltip for Next button. It is confusing for me, it seems like I am not allowed to access this page
  • Make the text next to checkboxes and the checkboxes black not gray. It looks like it is disabled.
  • Move the link to your reference in the success display to <a>Your reference</a> for x y is public now. It will look more clear.

@mrkvon mrkvon force-pushed the references-create-react branch from 65ea41c to 1116c40 Compare December 13, 2018 20:48
@mrkvon
Copy link
Contributor Author

mrkvon commented Dec 13, 2018

@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?

@mrkvon
Copy link
Contributor Author

mrkvon commented Dec 14, 2018

can we merge this? @simison @guaka

Sorry, false alert. There is still stuff to do. (axios, wrapping strings for translation)

@mrkvon mrkvon force-pushed the references-create-react branch 2 times, most recently from 1572ea5 to 2a72c4a Compare December 16, 2018 19:29
import axios from 'axios';
import set from 'lodash/set';
import get from 'lodash/get';
import has from 'lodash/has';
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@simison simison left a 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.

mrkvon and others added 20 commits December 17, 2018 00:02
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
@mrkvon mrkvon force-pushed the references-create-react branch from 2a72c4a to 8318c6c Compare December 16, 2018 23:05
@mrkvon
Copy link
Contributor Author

mrkvon commented Dec 17, 2018

I'm merging. Still missing: the logic when only (Recommend: Yes) is allowed. That is - after the other direction reference is published already.

@mrkvon mrkvon merged commit 55fd5a0 into master Dec 17, 2018
@mrkvon mrkvon deleted the references-create-react branch February 23, 2019 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants