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

Add VisualUnitsComponent #1328

Draft
wants to merge 13 commits into
base: development
Choose a base branch
from

Conversation

nlin21
Copy link
Contributor

@nlin21 nlin21 commented Aug 9, 2024

Description

This visual is implemented with D3.js, using units and conversions data pulled from redux.

image

Partly fixes #1224

For future development:

Type of change

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

Checklist

(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)

  • 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

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 @nlin21 for moving this forward. I like the way it works and testing found no issues. As noted there are a several items for the next person to finish up to finalize this.

I made a few comments that can be addressed if you have the time. They are fairly straightforward.

@@ -1016,6 +1017,7 @@ const LocaleTranslationData = {
"uses": "uses\u{26A1}",
"view.groups": "Visionner les groupes",
"visit": " ou visitez notre ",
"visual-unit": "Visual Units Graph.\u{26A1}",
Copy link
Member

Choose a reason for hiding this comment

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

No period in English so not here or Spanish.

import CreateVisualUnitMapModalComponent from './CreateVisualUnitModalMapComponent';

/**
* Defines the units page card view
Copy link
Member

Choose a reason for hiding this comment

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

Update comment for visual page.

<div className='container-fluid'>
<h2 style={titleStyle}>
<FormattedMessage id='visual-unit' />
{/* <div style={tooltipStyle}>
Copy link
Member

Choose a reason for hiding this comment

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

It is okay to have the tooltip visible. OED will add the needed help page.

nodes: [],
links: []
};
unitData.map(function (value) {
Copy link
Member

Choose a reason for hiding this comment

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

This is fine but I think most code in OED uses implicit functions rather than using the name.

links: []
};
unitData.map(function (value) {
data.nodes.push({'name': value.name,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe put the first item on its own line to be consistent with below and to make them line up.

data.links.push({
'source': value.sourceId,
'target': value.destinationId,
'bidirectional': value.bidirectional /* boolean value */
Copy link
Member

Choose a reason for hiding this comment

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

OED likes comments on the line above and not at the end of the line. Applies to other lines too.

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.

graphical display of units/conversions
2 participants