-
Notifications
You must be signed in to change notification settings - Fork 67
Add section for transformation settings #83
Conversation
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 think that we should change the Ads section to be a select box where you can select "Audience Network" or "Other/Raw HTML" and based on the selection we show the text/area field, because you shouldn't be able to add both. Thoughts?
Makes sense, @mburak. I will make that change today. By the way, the same logic will not apply to the Analytics section (which you did not mention, but I am clarifying) as you can have multiple trackers in the same Instant Article. Also, does it make sense to bump up the version in the package.json file to 0.0.2? |
Yes, I didn't ask about Analytics section because the behavior is correct. |
a4ee8dd
to
a55459f
Compare
Here is the updated version, @mburak. These are the new changes:
I found an issue with the IA SDK where if all the fields in the Please let me know if you need anything else. |
It looks great @pestevez! Just a small style nit. As you can see in this picture, the Type label is missing the bullet: Thanks for pointing out that SDK issue. We were aware of it but we never fixed it. I think it's of easy resolution. (cc @everton-rosario ) |
Thanks, @mburak. For the label's bullet, I feel this field is a bit different. We have been using the following icons:
In this case, the drop-down itself is not considered required or optional (it's like Schrödinger's cat!) because it only controls which fields are shown, and these fields are the ones that are optional or required (all optional in this case.) I feel the "Type" label is similar to the one we have for selector or attribute, that do not have an icon: but I am happy to add the icon, if you feel strongly about it. In any case, I will hold on merging this PR until the SDK issue is resolved. |
Oh now I get it! As every field was using the bullet point, I thought every field was using it, that's why it looked weird to me. Now I get your point. Perhaps we could add some help tips indicating that what you explained in the last comment? |
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 stuff @pestevez! I just added a comment, feel free to work on that here or open a new issue for that.
Thanks!
return this.props.settings.adsSettings.type === AdsTypes.RAW_HTML ? ( | ||
<div> | ||
<label className="sub-label" htmlFor="adsRawHtml"> | ||
<span>{this.props.settings.adsSettings.rawHtml ? '✔' : '•'}</span> |
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 think we should have constants for these values ✔and • as we are using them in a lot of places. Or maybe a helper function where you pass the value and it renders one or the other based on if it's null or not.
As this is just a general improvement, feel free to open a new issue to address this.
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.
Sounds good! Thanks
This PR adds a new section to define additional settings for the transformation.
Here is a summary of the changes:
Testing Plan
composer install