-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
✨ prefer smallFilename for data insights #4452
Conversation
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2025-01-15 00:12:53 UTC |
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.
Just to confirm, we want to retroactively apply this change for all existing data insights, right?
For the logic, one of my favorite maxims of software development is "I don't know, I don't wanna know". It would be better if the Image
didn't know where it is used, and instead we passed in a prop (preferSmall
?) to achieve the same effect. We always know we are in a data insight at the call site after all, right? That way it will stay more decoupled.
Yup, retroactive (hence why I contemplated this solution, but decided it was too much work for this somewhat-experimental project (even though I feel 80% confident that we'll stick with single-image data insights)) I like that maxim, and I feel you on the context codepath thing. If you feel more strongly about it than I do, I'll gladly change it, though 🙂 |
I think adding it to the image block(s) in content body would be probably nicer than prop drilling it at the top level. But I prefer either of those to the context. So please change it, unless there is something problematic lurking there that we missed. |
09c6bcf
to
950dc12
Compare
@rakyi changed 🙂 |
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.
Great, thank you!
950dc12
to
201535c
Compare
Resolves #4416
Changes:
documentType
property to theDocumentContext
objectImage.tsx
to always use thesmallFilename
(if defined) if the image is being used in a data insight