-
Notifications
You must be signed in to change notification settings - Fork 7
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
Grammar setnames fix #303
Grammar setnames fix #303
Conversation
✅ Deploy Preview for upset2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
80c38b2
to
7067298
Compare
packages/upset/src/utils/exports.ts
Outdated
const splitElName = r['elementName'].split(' '); | ||
const splitElName = r['elementName'].split('~&~'); | ||
|
||
let elName = splitElName.join(', '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
let elName = splitElName.join(', '); | |
let elName = splitElName.join(' & '); |
packages/upset/src/utils/exports.ts
Outdated
|
||
if (splitElName.length > 1) { | ||
const lastWord = splitElName.pop(); | ||
const elName = splitElName.join(', '); | ||
r['elementName'] = `${elName}, and ${lastWord}`; | ||
// elName = `${elName}, and ${lastWord}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// elName = `${elName}, and ${lastWord}`; |
packages/upset/src/utils/exports.ts
Outdated
} else if (r.type === 'Aggregate') { | ||
const r2 = r as Aggregate; | ||
if (r2.aggregateBy === 'Overlaps') { | ||
elName = elName.split(' - ').join(' & '); // overlaps look like "Adventure - Action", so replace the hyphen with " & " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this -
coming from somewhere else?
Does this PR close any open issues?
Closes #301
Depends #302
Give a longer description of what this PR addresses and why it's needed
Previously, there was a strange discrepancy between the downloaded json data setnames and the alt-text generated setnames. This was due to the fact that the alt-text config generation function was not adjusting the element name field prior to export.
By adding this to the alt text, the output seems to be as expected.
Tested with Simpsons and Movie dataset.
Provide pictures/videos of the behavior before and after these changes (optional)
@elizaan
Please confirm that this is correct:
Are there any additional TODOs before this PR is ready to go?
TODOs:
~&~