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

Issue#1163 resolved, Issue#1292 resolved, and Issue#1293 partially resolved #1325

Open
wants to merge 24 commits into
base: development
Choose a base branch
from

Conversation

danielshid
Copy link
Contributor

@danielshid danielshid commented Aug 2, 2024

Description

I fixed the issue with map displaying the wrong data based on bar by implementing it so bar and map are dependent on the same range. I also implemented dropdown menus for bar, map, and compare intervals, as well as the custom option for map. Map is complete; however, custom cannot currently be implemented for compare.

Fixes #1163, Fixes #1292, and Partly Addresses #1293

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

N/A

@huss
Copy link
Member

huss commented Aug 3, 2024

This PR has merge conflicts. It would help me to have them resolved so I can test the final result and run the tests. If you need help then let me know. Thanks.

@huss
Copy link
Member

huss commented Aug 4, 2024

I think this only partly addresses issue #1293 since it does not do compare. I think the description should be modified to reflect this so it will not automatically close when this PR is merged. Also, adding a comment to the issue that map is complete would be good.

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @danielshid for addressing all these issues. Testing found it works as expected. I made a couple of comment involving code layout to think about. Let me know if you have thoughts or want to discuss. I also made a comment about one linked issue.

@danielshid danielshid changed the title Issue#1163, Issue#1292, and Issue#1293 resolved Issue#1163 resolved, Issue#1292 resolved, and Issue#1293 partially resolved Aug 9, 2024
Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @danielshid for the updated code. Review found it works as desired. I've made a few small comments to address but this is very close to done.

Also, I merged development to test. You will need to update your DB per the msg to Discord developers.

src/client/app/components/MapControlsComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/CompareControlsComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/IntervalControlsComponent.tsx Outdated Show resolved Hide resolved
Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @danielshid for addressing the previous comments. I've made a couple more that should be fairly easy to address. Let me know if you have questions or cannot address them.

src/client/app/components/IntervalControlsComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/IntervalControlsComponent.tsx Outdated Show resolved Hide resolved
Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @danielshid for the updated code. While they addressed the comments at the time, I've made a few more based on other code coming and some things I noticed. I appreciate you looking into them.

))
: (
<>
<option value='1'>{translate('day')}</option>
Copy link
Member

Choose a reason for hiding this comment

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

Why not use comparePeriodTranslations? Another comment might naturally lead to this.

src/client/app/translations/data.ts Show resolved Hide resolved
};

// Defines the set of options for the dropdown
const options = chartType === ChartTypes.compare
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking that the menu would be set up with the three standard option and the custom added after the loop when appropriate. Here is code from an upcoming change to units that shows the basic idea:

{Object.entries(LineGraphRates).map(
	([rateKey, rateValue]) => (
		<option value={rateValue * 3600} key={rateKey}>
			{translate(rateKey)}
		</option>
	)
)}
<option value={CUSTOM_INPUT}>
	{translate('custom.value')}
</option>

What do you think?

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.

dropdown for all interval choices values wrong on map graphic based on bar choice
2 participants