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

Redesigned data entry page #133

Merged
merged 12 commits into from Nov 8, 2022

Conversation

ivan-kishko
Copy link
Collaborator

@ivan-kishko ivan-kishko commented Nov 2, 2022

Description of the change

Redesigned data entry page implementation

  • Redesigned summary panel
  • Redesigned publish data panel
  • Redesigned data entry form
  • Add Help Page

Type: Non-breaking refactor

All pull requests must have at least one of the following labels applied (otherwise the PR will fail):

Label Description
Type: Bug non-breaking change that fixes an issue
Type: Feature non-breaking change that adds functionality
Type: Breaking Change fix or feature that would cause existing functionality to not work as expected
Type: Non-breaking refactor change addresses some tech debt item or prepares for a later change, but does not change functionality
Type: Configuration Change adjusts configuration to achieve some end related to functionality, development, performance, or security
Type: Dependency Upgrade upgrades a project dependency - these changes are not included in release notes

Related issues

Closes #118

Checklists

Development

This box MUST be checked by the submitter prior to merging:

  • Double- and triple-checked that there is no Personally Identifiable Information (PII) being mistakenly added in this pull request

These boxes should be checked by the submitter prior to merging:

  • Tests have been written to cover the code changed/added as part of this pull request

Code review

These boxes should be checked by reviewers prior to merging:

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has been moved out of a Draft state, has no "Work In Progress" label, and has assigned reviewers
  • Potential security implications or infrastructural changes have been considered, if relevant

@ivan-kishko
Copy link
Collaborator Author

ivan-kishko commented Nov 2, 2022

Hello all! Have a couple comments

  1. 1 test failed due to DataEntryFormTest expects context fields to be in form but according to new design they are removed from there. I already asked @lilidworkin in slack about what should I do with this, but any comments about this would be great to hear.
  2. Disabled disaggregation tab name inside form should be darkgrey when hovered (but not active). When active it turns blue, and currently i did not change blue to darkgrey on hover. If it has to be changed, please let me know, I guess it is question for you @hobuobi.
    Thanks!

Update: question about test is solved

@mxosman
Copy link
Contributor

mxosman commented Nov 2, 2022

Hello all! Have a couple comments

  1. 1 test failed due to DataEntryFormTest expects context fields to be in form but according to new design they are removed from there. I already asked @lilidworkin in slack about what should I do with this, but any comments about this would be great to hear.
  2. Disabled disaggregation tab name inside form should be darkgrey when hovered (but not active). When active it turns blue, and currently i did not change blue to darkgrey on hover. If it has to be changed, please let me know, I guess it is question for you @hobuobi.
    Thanks!

Hi Ivan! I haven't done a deep dive into the code yet - but just to answer your first question - that's totally fine. Makes sense since the context is no longer in the data entry form and your solution to remove its assertion from the test is perfect.

@lilidworkin
Copy link
Collaborator

@ivan-kishko this looks great!! A few tiny things:

  1. I think the behavior you have for hovered/active disabled disaggregation tab names is fine! (i.e. turns dark grey on hover, and blue on active).
  2. I did notice that hovering on a non-disabled disaggregation tab name doesn't do anything -- should it turn blue? I think that was the previous behavior.
  3. If only one metric is disabled, the text at the bottom of the page is slightly wrong grammatically. Instead of

Total Staff is associated with your agency’s operations, but have been disabled. If you believe this is incorrect, go to Metric Configuration to re-enable them.

it should be

Total Staff is associated with your agency’s operations, but has been disabled. If you believe this is incorrect, go to Metric Configuration to re-enable it.

Question for @hobuobi -- I found myself missing the "Back to Reports Overview" link we used to have on the left side. Do we not need that anymore since we have "Save as Draft" instead?
Screen Shot 2022-11-02 at 5 11 27 PM

@lilidworkin
Copy link
Collaborator

Oh, and one other tiny thing: in the help panel, the next next to "Breakdowns" seems to be vertically aligned, but instead can it go onto two lines?

That is, instead of
Screen Shot 2022-11-02 at 5 12 32 PM

Can it look like
Screen Shot 2022-11-02 at 5 13 28 PM

@ivan-kishko
Copy link
Collaborator Author

ivan-kishko commented Nov 2, 2022

@ivan-kishko this looks great!! A few tiny things:

  1. I think the behavior you have for hovered/active disabled disaggregation tab names is fine! (i.e. turns dark grey on hover, and blue on active).
  2. I did notice that hovering on a non-disabled disaggregation tab name doesn't do anything -- should it turn blue? I think that was the previous behavior.
  3. If only one metric is disabled, the text at the bottom of the page is slightly wrong grammatically. Instead of

Total Staff is associated with your agency’s operations, but have been disabled. If you believe this is incorrect, go to Metric Configuration to re-enable them.

it should be

Total Staff is associated with your agency’s operations, but has been disabled. If you believe this is incorrect, go to Metric Configuration to re-enable it.

Question for @hobuobi -- I found myself missing the "Back to Reports Overview" link we used to have on the left side. Do we not need that anymore since we have "Save as Draft" instead? Screen Shot 2022-11-02 at 5 11 27 PM

@hello @lilidworkin
1.Got it.
2. If you look at the video that attached to this task hovering over not active and non-disabled disaggregation indeed does not do anything (or maybe mouse was not exactly on item and this is my mistake then). Anyway some hover effect seems reasonable, going to fix it.
3.Sorry did not notice, gonna fix it as well

About that link - now we have "Save as Draft" button which does the same, also you can see that in figma this link is removed (not on demo video though)

Fixed with 428bca7 and 4e363fa

@@ -125,6 +124,7 @@ const DataEntryForm: React.FC<{

const isPublished =
reportStore.reportOverviews[reportID].status === "PUBLISHED";
const navigateState = { settingsMenuOption: menuOptions[2] };
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@mxosman
Copy link
Contributor

mxosman commented Nov 3, 2022

Hi Ivan! This looks fantastic - thank you for swimming in the wild DataEntryForm sea! It's really cool to see these pages evolve and I love a lot of the decisions you made.

Here are a few notes from my end:

  1. When hovering over a disabled disaggregation tab, the tooltip's opacity appears too faint.

Screen Shot 2022-11-03 at 11 08 26 AM

  1. Small note: for some reason it feels like the spacing between paragraphs and the line height in the text in the help modal are a bit vertically overcrowded. I'm not sure if Figma has the exact measurements between these areas if it was written in one text box - but I would recommend adding a bit more line height and spacing between paragraphs:
    This PR:

Screen Shot 2022-11-03 at 11 16 25 AM

Figma:

Screen Shot 2022-11-03 at 11 40 05 AM

  1. When the Need Help modal is open, it feels a bit strange to still be able to interact with the data entry form. My recommendation is to disallow any interaction with the layers below the open modal/background.

Screen Shot 2022-11-03 at 11 33 34 AM

@terryttsai
Copy link
Contributor

Going off of Mahmoud's comment on how we should disable interaction with the layers below the Need Help modal, we could also make it so that clicking outside the need help modal closes the modal?

<Button type="border" onClick={() => setShowDataEntryHelpPage(true)}>
Need Help?
</Button>
<Button type="border" onClick={() => navigate("/")}>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more a question for @hobuobi but should this button be called "Save as Draft" if we already autosave and this just navigates you to the Reports page?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can imagine users clicking on this button needlessly thinking they need to in order to save their progress

…me help page styled components, disable interaction with form while help page is shown,
@ivan-kishko
Copy link
Collaborator Author

Hi Ivan! This looks fantastic - thank you for swimming in the wild DataEntryForm sea! It's really cool to see these pages evolve and I love a lot of the decisions you made.

Here are a few notes from my end:

  1. When hovering over a disabled disaggregation tab, the tooltip's opacity appears too faint.
Screen Shot 2022-11-03 at 11 08 26 AM
  1. Small note: for some reason it feels like the spacing between paragraphs and the line height in the text in the help modal are a bit vertically overcrowded. I'm not sure if Figma has the exact measurements between these areas if it was written in one text box - but I would recommend adding a bit more line height and spacing between paragraphs:
    This PR:
Screen Shot 2022-11-03 at 11 16 25 AM

Figma:
Screen Shot 2022-11-03 at 11 40 05 AM

  1. When the Need Help modal is open, it feels a bit strange to still be able to interact with the data entry form. My recommendation is to disallow any interaction with the layers below the open modal/background.
Screen Shot 2022-11-03 at 11 33 34 AM

Hello @mxosman , fixed all you asked to in commit 3c07c0a
Have a few comments though:

  1. This hovering - I can't reproduce that, thing is - tooltip has no css properties that would set opacity or something like that, can you tell a bit more what you made to make tooltip look like that.
  2. In fact figma has like description of what font-sizes and line-heights are used in this text (can not understand why it look different), actually these are from predefined typography theme for project. Anyway you are right, I added some more spacing and changed line-height of subtitle to make it look prettier
  3. I did that, but reading what @terryttsai wrote maybe I will have to change it again, will see.

@mxosman
Copy link
Contributor

mxosman commented Nov 3, 2022

Hello @mxosman , fixed all you asked to in commit 3c07c0a Have a few comments though:

  1. This hovering - I can't reproduce that, thing is - tooltip has no css properties that would set opacity or something like that, can you tell a bit more what you made to make tooltip look like that.
  2. In fact figma has like description of what font-sizes and line-heights are used in this text (can not understand why it look different), actually these are from predefined typography theme for project. Anyway you are right, I added some more spacing and changed line-height of subtitle to make it look prettier
  3. I did that, but reading what @terryttsai wrote maybe I will have to change it again, will see.

Thank you, Ivan!

  1. I figured out that it was happening on the 3rd disaggregation tab. Do you have access to other agencies? If so, if you navigate to the agency list and select Law Enforcement (for this example), go to the Settings > Metric Configuration > Select Total Arrests metric (since it has 3 disaggregation tabs) and disable the 3rd tab (Gender) - attaching a video of the steps:
Screen.Recording.2022-11-03.at.5.10.52.PM.mov

Let me know if you can recreate. It's on report metrics that have 3 disaggregation tabs and the 3rd one is disabled.

  1. OK - I'm glad I'm not the only one - this has stumped me before too - not sure why despite using the same predefined font properties, it looks slightly different. Thank you for taking time to make those adjustments!

  2. To clarify, I think Terry meant in addition to disabling interaction with the below form when the modal is open, we can also set the behavior of clicking outside of the open modal to trigger the modal to close.

@terryttsai
Copy link
Contributor

Besides my suggestions, the code looks good to me, thanks Ivan!

@ivan-kishko
Copy link
Collaborator Author

ivan-kishko commented Nov 4, 2022

Hello @mxosman , fixed all you asked to in commit 3c07c0a Have a few comments though:

  1. This hovering - I can't reproduce that, thing is - tooltip has no css properties that would set opacity or something like that, can you tell a bit more what you made to make tooltip look like that.
  2. In fact figma has like description of what font-sizes and line-heights are used in this text (can not understand why it look different), actually these are from predefined typography theme for project. Anyway you are right, I added some more spacing and changed line-height of subtitle to make it look prettier
  3. I did that, but reading what @terryttsai wrote maybe I will have to change it again, will see.

Thank you, Ivan!

  1. I figured out that it was happening on the 3rd disaggregation tab. Do you have access to other agencies? If so, if you navigate to the agency list and select Law Enforcement (for this example), go to the Settings > Metric Configuration > Select Total Arrests metric (since it has 3 disaggregation tabs) and disable the 3rd tab (Gender) - attaching a video of the steps:

Screen.Recording.2022-11-03.at.5.10.52.PM.mov
Let me know if you can recreate. It's on report metrics that have 3 disaggregation tabs and the 3rd one is disabled.

  1. OK - I'm glad I'm not the only one - this has stumped me before too - not sure why despite using the same predefined font properties, it looks slightly different. Thank you for taking time to make those adjustments!
  2. To clarify, I think Terry meant in addition to disabling interaction with the below form when the modal is open, we can also set the behavior of clicking outside of the open modal to trigger the modal to close.

Thanks for clarifying on steps to repro the issue with hovering disaggregation @mxosman!
So from what I get - it has nothing to do with order but with fill state of dimensions inside disaggregation. This effect you can see when it is disabled but has some filled inputs with or without errors. Basically in this case icon and tooltip have been given additional css with filter property. I just change it to use opacity instead filter and now on hover everything is ok and not hover state looks the same from user perspective. Although not sure why disabled disaggregation keeps values inside its inputs, but I guess this is a question for another day or task)
Made close help page on click away as well. Check out 84a2438 and b00d836 commits to look at result! Thanks!

@mxosman
Copy link
Contributor

mxosman commented Nov 4, 2022

Thanks for clarifying on steps to repro the issue with hovering disaggregation @mxosman! So from what I get - it has nothing to do with order but with fill state of dimensions inside disaggregation. This effect you can see when it is disabled but has some filled inputs with or without errors. Basically in this case icon and tooltip have been given additional css with filter property. I just change it to use opacity instead filter and now on hover everything is ok and not hover state looks the same from user perspective. Although not sure why disabled disaggregation keeps values inside its inputs, but I guess this is a question for another day or task) Made close help page on click away as well. Check out 84a2438 and b00d836 commits to look at result! Thanks!

Thank you so much for all the changes, Ivan! Very strange about the tooltip! For some reason I'm still seeing it when I run this branch with your latest commits (HEAD = b00d836):
Screen Shot 2022-11-04 at 9 00 40 AM

This is on Law Enforcement > Total Arrests -- do you see the same or no?

Everything else looks good to me!

@mxosman
Copy link
Contributor

mxosman commented Nov 4, 2022

Thanks for clarifying on steps to repro the issue with hovering disaggregation @mxosman! So from what I get - it has nothing to do with order but with fill state of dimensions inside disaggregation. This effect you can see when it is disabled but has some filled inputs with or without errors. Basically in this case icon and tooltip have been given additional css with filter property. I just change it to use opacity instead filter and now on hover everything is ok and not hover state looks the same from user perspective. Although not sure why disabled disaggregation keeps values inside its inputs, but I guess this is a question for another day or task) Made close help page on click away as well. Check out 84a2438 and b00d836 commits to look at result! Thanks!

Thank you so much for all the changes, Ivan! Very strange about the tooltip! For some reason I'm still seeing it when I run this branch with your latest commits (HEAD = b00d836): Screen Shot 2022-11-04 at 9 00 40 AM

This is on Law Enforcement > Total Arrests -- do you see the same or no?

Everything else looks good to me!

It shows up fine when the disaggregation tab is clicked (open) - but when it is not open the tooltip has this grey'd like the screenshot above.

@mxosman
Copy link
Contributor

mxosman commented Nov 4, 2022

I think I found the culprit - try removing the opacity all together in the DisaggregationHasInputIndicator styled component.

@ivan-kishko
Copy link
Collaborator Author

I think I found the culprit - try removing the opacity all together in the DisaggregationHasInputIndicator styled component.

It is going to work but then disabled disaggregations which have inputs filled will not look different from ones that has only empty inputs. Can't understand why It does not work for you.

Screen Shot 2022-11-04 at 5 27 40 PM

@ivan-kishko
Copy link
Collaborator Author

I think I found the culprit - try removing the opacity all together in the DisaggregationHasInputIndicator styled component.

It is going to work but then disabled disaggregations which have inputs filled will not look different from ones that has only empty inputs. Can't understand why It does not work for you.

Screen Shot 2022-11-04 at 5 27 40 PM

@mxosman I figured out why, need some time to resolve it.

@ivan-kishko
Copy link
Collaborator Author

ivan-kishko commented Nov 4, 2022

@mxosman sorry for that issue was not actually solved. Can you please check ad1697e commit if you have time?

Copy link
Contributor

@mxosman mxosman left a comment

Choose a reason for hiding this comment

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

@mxosman sorry for that issue was not actually solved. Can you please check ad1697e commit if you have time?

No apologies necessary at all - I'm sure a lot of this is due my past-self's decisions. Thank you so much for taking the time on this - I really like your solution! Much appreciated.

Copy link
Collaborator

@lilidworkin lilidworkin left a comment

Choose a reason for hiding this comment

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

Thank you, @ivan-kishko ! This should be good to merge! I hope we'll have a new task for you ASAP!

@ivan-kishko ivan-kishko merged commit 3d71fff into main Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement redesigned Data Entry page.
4 participants