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

Feature/claim modal #558

Merged
merged 26 commits into from
Jun 23, 2021
Merged

Feature/claim modal #558

merged 26 commits into from
Jun 23, 2021

Conversation

victorgdev
Copy link
Contributor

@victorgdev victorgdev commented Jun 7, 2021

What issue does this PR close

Closes #536, closes #383

Changes Proposed ( a list of new changes introduced by this PR)

Currently, a claim is displayed in an specific page when a claim card is clicked by the user. The proposed change displays all of the detailed information apparent in the claim specific page in a modal.

Pages that display claim cards (.../claims, .../dashboard, .../dashboard/analysis) will have this feature. When user onClicks a claim card a modal with detailed information of the clicked claim will pop-up.

How to test ( a list of instructions on how to test this PR)

  1. Go to each of these pages:
  • .../claims
  • .../dashboard
  • .../dashboard/analysis
  1. Find the list of claims
  2. Click on a claim card of your choice
  3. Open claim modal

Here is the figma design

@lucca65
Copy link
Member

lucca65 commented Jun 7, 2021

The build is failing @victorgdev

Copy link
Member

@henriquecbuss henriquecbuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victorgdev please make sure your files are formatted with elm-format (the CI/CD pipeline will fail if they aren't)

I haven't tested it yet because the build is failing, but here are some comments on the code itself

src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
src/elm/Claim.elm Outdated Show resolved Hide resolved
@victorgdev
Copy link
Contributor Author

I will redo the elm-format command to fix the build failing!

Copy link
Member

@lucca65 lucca65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bro looking at the code it still have some "basic" issues, like functions commented all over the place, no elm-format. I would consider this a draft pull request because its not "review ready". Its ok to be like that but please consider those like a "basic checklist" before asking for a review. If its still not ready (ready in the sense I'm presenting here) and you would like a review, its possible to ask for it when its still on draft!

@henriquecbuss
Copy link
Member

We were doing some tests/exploratory work yesterday, that's why it has a bunch of things commented out 😅. +1 on marking as draft for now though

@lucca65
Copy link
Member

lucca65 commented Jun 9, 2021

🧑‍🏭

@victorgdev victorgdev marked this pull request as draft June 9, 2021 17:15
@victorgdev
Copy link
Contributor Author

victorgdev commented Jun 9, 2021

Just for note taking purposes and validating rationale @NeoVier. Considering the profile photo onHover pop-up feature the new aspects to be considered in order to have the claim modal displaying this feature properly are:

  • How the claim card is related to the claim modal.
  • How and what the claim modal receives these lists of profiles.
  • In the claim modal the multiple profile photos source and lists (top of the modal, list of voters(approved and disapproved) and list of pending voters).

The goal right now is to:

  • Implement the profile photos structure, including all the needed profiles source and lists - Partially done
  • Fix how each module receives the claim modal (.../claims, .../dashboard, .../dashboard/analysis)

Copy link
Member

@lucca65 lucca65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found some things

  1. Elm format is still not running, you actually shouldn't even be allowed to commit without it. @NeoVier any chance you know why husky isn't triggering Elm Format?
    Also, please always check GitHub for those stuff, so we can get this out of the way

  2. The "no one" tags is using a different style and font weight then other name tags (check a normal user on the second print). It is also not aligned the same depending on the scenario:

Captura de Tela 2021-06-14 às 22 11 03

  1. PDF looks fine on the card, but when opening a preview it is stretched:

Captura de Tela 2021-06-14 às 22 10 49

Captura de Tela 2021-06-14 às 22 10 45

  1. We should show the full asset here "1 AIKI" instead of "1". It should take precision into consideration: "1,300 AIKI"

Captura de Tela 2021-06-14 às 22 17 11

@henriquecbuss
Copy link
Member

Elm format is still not running, you actually shouldn't even be allowed to commit without it. @NeoVier any chance you know why husky isn't triggering Elm Format?

Looking at our husky config, it's only running standard and review. Would it make sense to automatically run elm-format (and not just check if it's formatted)?

elm-format is triggered only on the on-push-action, that's why it's triggered on GitHub, but not before pushing

We should show the full asset here "1 AIKI" instead of "1". It should take precision into consideration: "1,300 AIKI"

#383 👀

@lucca65
Copy link
Member

lucca65 commented Jun 15, 2021

Would it make sense to automatically run elm-format (and not just check if it's formatted)?

I don't think so, it should block the commit from the client, not automatically format

henriquecbuss
henriquecbuss previously approved these changes Jun 22, 2021
Copy link
Member

@henriquecbuss henriquecbuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

Copy link
Member

@lucca65 lucca65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed something weird... when i vote for a claim and it fails, the modal is kept open and for some reason become full screen on mobile... i'm using an iPhone

if you need me to help you make some claim break, ping me

@lucca65
Copy link
Member

lucca65 commented Jun 22, 2021

oh also, the design team can already start to test this!

@juramos-2020
Copy link

Hi @NeoVier do you have any specific link to test this one?

@henriquecbuss
Copy link
Member

@juramos-2020 you can use any of the ones that say "Deploy Preview ready!" (just click on "Details" and it should redirect you to the correct version of the app):

2021-06-22-130629_882x169_scrot

@juramos-2020
Copy link

Oi @NeoVier

quando eu acesso esse link que você recomenda eu não consigo realizar ações como: criar ações e objetivos, analisar claims, votar, etc.

O Helton tinha deixado um ambiente de testes pronto em que pudéssemos realizar todas essas funcionalidades do admin e do usuário. Mas parece que esse link acaba não sendo útil pra vocês.

Então queria ver com você como consigo resolver isso? 😅

@henriquecbuss
Copy link
Member

@juramos-2020 ele provavelmente preparou uma comunidade pra isso, certo?

Então, esse link te leva por padrão pra comunidade da Cambiatus, mas podes mudar de comunidade no canto superior esquerdo (onde fica o ícone da comunidade atual, no caso a Cambiatus):
WhatsApp Image 2021-06-22 at 1 43 06 PM

Ao clicar no ícone da comunidade, vai abrir um menu de seleção de comunidades, daí basta selecionar a comunidade de testes que o Helton preparou (tem que ser na mesma conta que ele usou, pra ser o admin da comunidade que ele preparou)

@juramos-2020
Copy link

Ahhhhhhh!
Entendi o que estava fazendo de errado 😅 (sorry)
Eu estava usando as minhas 12 palavras. Nesse caso eu tenho que usar as 12 palavras dele para ter acesso as comunidades que ele criou 😅
Agora vai dar certo! 💪

@juramos-2020
Copy link

The modal it's working 👏😍

I'm just not sure about the status: claim.approved.
I think it's just like: Approved

Screenshot_2021-06-22-14-13-05-930_com.android.chrome.jpg

@victorgdev
Copy link
Contributor Author

@juramos-2020 and @lucca65 I will check it out.

@lucca65
Copy link
Member

lucca65 commented Jun 22, 2021

@victorgdev this error happens sometimes, its not something you can manage, it happens randomly during some builds. We can safely ignore this!

Copy link
Member

@henriquecbuss henriquecbuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎨

@victorgdev
Copy link
Contributor Author

@juramos-2020 the claim modal is ready for testing and review.

For your information, the only change made was that when approving a claim via modal, if it fails to be approved the modal closes itself and the error msg is apparent as is.

Also, the "claim.approved" comment made is not to be worried, as @lucca65 pointed out above this is random build error that won't persist on the when deployed.

@juramos-2020
Copy link

Hi @victorgdev

I tested the modal with three statuses (approved, pending and reproved). And it is working normally.

Only in the modal with status "reproved" the tag "no one" is not appearing.
If this is also a compilation error that won't persist when implemented, then that's all ok 😉👍

Screenshot_2021-06-23-09-58-28-338_com.android.chrome.jpg

Screenshot_2021-06-23-09-58-14-687_com.android.chrome.jpg

Screenshot_2021-06-23-09-57-26-284_com.android.chrome.jpg

@victorgdev
Copy link
Contributor Author

Hi @juramos-2020, yes this is precisely the case. Can I merge this PR?

@juramos-2020
Copy link

Hi @victorgdev l

About the teste it is all ok. But about the merge PR I don't know how this works.

@victorgdev
Copy link
Contributor Author

Thanks! I got your back on that @juramos-2020! 💪

@victorgdev victorgdev merged commit 9073fb4 into master Jun 23, 2021
@victorgdev victorgdev deleted the feature/claim-modal branch June 23, 2021 22:05
@lucca65
Copy link
Member

lucca65 commented Jun 23, 2021

💥

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.

Claim modal Improve function Eos.assetToString to auto fill precision
4 participants