-
Notifications
You must be signed in to change notification settings - Fork 814
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
WW-4634 Centre alignment doesn't seem to work in Velocity tags #95
Conversation
update pull
Easymock update
pull update
update pull
update pull
update pull
update pull
<td | ||
<td | ||
<#if parameters.align??> | ||
class="tdAlign${parameters.align?html}" |
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.
Can you use -
to separate prefix and suffix?
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.
You mean like this class="tdAlign-${parameters.align?html}" ?
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.
yes
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.
Done
This doesn't fix the main issue, right? |
Yes, it does fix the main issue and keep the back compatibility. |
Another thing I will change the name to just
because this css class can be used in other places that are using the align attribute; which is s Not supported in HTML5. |
Why not just add some CSS class to this table cell? Then end-users can style it as they want and align parameter will not be needed. |
CSS class to this table cell is what we have now and to have back compatibility as @lukaszlenart said. |
I'm just wondering what was the main reason, I have prepared a unit test and it didn't pass when using 2.3.29-SNAPSHOT which means 2.3.28.1 is broken the same way. |
@lukaszlenart the parameter align was remove on this commit |
Issue is about Velocity tags, not FreeMarker. Are we still supporting Velocity tags? |
So it's not a regression bug ;-) Yes, we do support Velocity. |
How the Velocity templating is working? The only Velocity templates I see are in the archive. |
Yep, the aforementioned commit misses css class for that cell in the |
OH ok, got you https://github.com/apache/struts/tree/master/core/src/main/resources/template/archive I missed that. |
the css class for that cell is in the controlheader.ftl already. |
All the tags are implemented in FreeMarker, those archive templates are deprecated and should be thrown away. |
@lukaszlenart Ahh ok. Thanks for clarifying that. |
@victorsosa I mean something like And if alignment doesn't work in 2.3 and your solution fixes it, then this PR should target |
It will break back compatibility as @lukaszlenart said. |
@victorsosa You see, this commit already broke backward compatibility, but it was incomplete in the way it didn't introduce css class for the input cell. |
@victorsosa this commit a0b3480 dropped |
I would prefer to follow html5 and drop align attribute completely from S2 tags, BUT @victorsosa can you at least add some css class to input cell along with your solution.
|
@aleksandr-m You mean something like THat means drop align attribute completely from S2 tags; So from now on the only way to set the align to center for example is to overwrite the css class tdInput in 2.5, right? I will change that code. |
@victorsosa IMO it would be great. BUT if we really really want it to be backward compatible then we can do both. Add a class for future and use align attribute with |
👍 |
class="align-${parameters.align?html}"
Tests are failing :(
|
103 tests need to be updated, I think it isn't worth |
I will fix the 103 test cases, give me some time |
@victorsosa osm! |
I assume we're ok with this and this PR can be merged? |
Yes, I am ok |
Looks fine. Good job. |
Fix for WW-4634
Centre alignment doesn't seem to work in Velocity tags