-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove d3 format option from PopUps #68
Conversation
This pull request is being automatically deployed with Vercel (learn more). |
/cc before entering into CR, @borja-munoz do you agree on this? I think it's a good moment to remove this. |
It looks like we have some failing test, related to histogram @jesusbotella |
I see that tests are passing right now. Did you re-run them? |
GITHUB issue? I'm not sure why, but it looks like here we have some comments that belongs to another PR (at least in my browser I get some un-related comments about 'histogram', that don't belong to this). |
Yes, not sure. I saw that histogram comment as well 😅 , but tests are passing. |
I ran them again, yes! |
e3fdbc6
to
0368fbc
Compare
.... ok, so coming back to this issue.... Please @manmorjim have a look at it |
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.
Everything looks great to me 👌
Just a small request to keep the format
options for custom functions.
/** | ||
* d3 format for the value of this attribute. | ||
*/ | ||
format?: string | FormatFunction; |
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.
we should keep the format
option for functions right?
format?: (value: any) => any;
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.
I thought it was just related to d3... oka
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.
Yup sorry, the comment was outdated and wrong 😅
src/lib/viz/popups/Popup.ts
Outdated
} | ||
|
||
elementValue = formatter(elementValue); | ||
} else if (format && typeof format !== 'function') { |
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.
the second condition is not necessary
...
} else if (format) {
...
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.
for sure! thx
275a5f4
to
ff306ae
Compare
Rebasing to get changes from develop... |
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.
🚀
ef48d6e
to
269af53
Compare
This is a small PR to remove the dependency on d3.format for the library.
Main reasons:
So instead of
the user would use the general option to pass any function
As a complement:
moment.js
)