Closed jbalsas closed 4 years ago
A beautiful summary of the trade-offs.
Good summary I also don't see many specific things in the components that are for IE 11, I agree not to do anything about it for the components, if you look at the browser: ie
label, there were few bugs reported but the vast majority of the site.
I don't have that much vision of hacks for CSS but @pat270 could say better how much we have of it and what we can benefit from if we were to work on it in a major version maybe for CSS. I like the idea of ββthe variable but a question since we really intend to eliminate support maybe we could go with a 4.x version of CSS and remove these hacks without the flag?
For Clay CSS, I think we should up the major version. Having the setting $ie_support
implies any new component or update we do needs to work in IE11 if that setting is set to true.
Like @matuzalemsteles said, I don't think the react components have much specific for ie11, but I believe clay-css has quite a bit. I think I would lean towards agreeing with @pat270, that its safer to just up a major version for clay-css and not worry about setting the ie_suppot
flags
So, upping clay-css
would mean:
@3.x
for components and @4.x
for clay-css
which is somewhat confusing.@clay/css
simultaneously. It'll be hard to keep track of fixes going to one branch or the other.1
, we'd need to up versions for all clay packages, which would cause 2
but for every package.Based on past experience, I think the version divergence is something to avoid until really necessary. I honestly think the costs of moving to 4.x
is greater than the benefit of removing those bits of IE code.
Ah I see, I was thinking we could get away with just not worrying about IE, but seems like we have to keep it in mind for older dxp versions(unless we can find a way around this?). In that case, I agree with you and that it's probably easier to maintain a single version rather than support two different versions.
Removing support for IE11 is a major change, but if it's too much hassle I rather do the $ie_support
thing instead of a complete removal. A complete removal will make it impossible to apply patches for 7.3. Clay CSS versions for 7.3 will stop at whatever version the removal lands on (e.g., 3.18.1
). I suppose one way we can circumvent is IE updates and general bug fixes can go in the theme π€·ββοΈ ?
I suppose one way we can circumvent is IE updates and general bug fixes can go in the theme π€·ββοΈ
That's actually a good idea... if we're okay with dropping IE11 support in Clay mid 3x, then we could move every bit of IE-specific CSS to DXP 7.3.x and cut a 3.19.0
version that does not support it. I think this is acceptable seeing as DXP is our main (and likely only) customer.
One alternative way in case someone is really against this would be to move all IE CSS to a different sass entry (ie.scss
). That means that for customers, upgrading to 3.19.0
would mean also including the ie.css
file if they want IE compatibility with clay. In DXP, this would also be done at the theme level.
and cut a
3.19.0
version that does not support it.
Got to be careful with semver though... if we don't follow it, we risk eroding people's trust. In an idea world, everybody knows that you can trust a Liferay npm package not to have any breaking changes in non-major updates (ie. ^
ranges are safe).
[...] we risk eroding people's trust
Yeah, that was my point about who's consuming clay... could you make your preference on this matter more explicit? Based on all the options, what would be your preferred path forward?
(We do have 150 β now that I realize π )
But based on npm
:
And those 2 are both us π€·
No usage of components outside of the @clayui org either. See @clayui/icon
We also have 420 weekly downloads of @clayui/css
, that requires an even better celebration π±
We also have 420 weekly downloads of @clayui/css, that requires an even better celebration π±
That's probably how many distinct ant all
s we run π
We also have 420 weekly downloads of
@clayui/css
, that requires an even better celebration π±
These are almost certainly > 95% downloads by Liferay employees building liferay-portal. You can see the same in eslint-config-liferay
, another one that clearly is only used by us, which "boasts" 1,234 weekly downloads.
Yeah, that was my point about who's consuming clay... could you make your preference on this matter more explicit? Based on all the options, what would be your preferred path forward?
My preference β based on thinking about this for 5.1 seconds β would be:
ie.scss
).@clayui/css
v4.I think this is the "have our cake and eat it too" path, because we implement a breaking change but we make it super easy for people to workaround it (by adding a file).
It is true that for as long as this ie.scss
file exists, we have to bear the cost of maintaining it, but the reality is that the cost should be low and diminish over time because:
ie.scss
and stop maintaining it at all in v5.But, that's just like, my opinion, man.
As @pat270 is the one who is most likely to bear the brunt of the costs of this decision, and he's the one with the most insight into the difficultly of doing such a refactoring, I think we should defer to his judgment.
Be honest and respect semver; ie. cut @clayui/css v4.
Based on that, how would you propose we maintain old DXP branches?
3.x
to maintain it over time and keep fixes in sync when necessary?v4
+ ie.css
?@clayui/css@4.x
and @clayui/icon@3.x
? It feels like this can become a bit of a maintenance nightmare if we can't make coherent sense of package versions about what works with what...In fact, I guess that if we break @clayui/css
that could mean that all packages that depend on it can also include the breaking change and thus need to be updated to v4
?
My thinking, again based on 2.6 seconds of careful reflection, is that the introduction of a breaking change in @clayui/css
and what happens in DXP are actually two separate things. That is, we can do what you said in your second bullet point:
- Update older DXP releases to
v4
+ie.css
?
ie. it is a breaking change, but we shield users of DXP from it. The only people who have to worry about ie.scss
are the rare breed of users that consume Clay independently.
- Do we need a branch for
3.x
to maintain it over time and keep fixes in sync when necessary?
As a matter of practice, we could fork a branch just like we did for 2.x
, but that case was a bit different because we moved all of Clay to v3.x. In this instance, we're only talking about bumping @clayui/css
, and it stays right there on master
along with everything else. (Because I don't see why we'd need to go back and apply maintenance fixes to @clayui/css
v3.x βΒ if somebody wants a fix, they upgrade to v4.x, and if they need to isolate themselves from the breaking change, the use the ie.scss
file.)
- Are we fine with
@clayui/css@4.x
and@clayui/icon@3.x
? It feels like this can become a bit of a maintenance nightmare if we can't make coherent sense of package versions about what works with what...
I think we're already in that situation, ever since we decided not to do atomic releases. Just look at all the different version numbers in frontend-taglib-clay
. That is, this doesn't seem like it would make things much worse?
Just to finish with what I said before...
@pat270 is the one who is most likely to bear the brunt of the costs of this decision, and he's the one with the most insight into the difficultly of doing such a refactoring, I think we should defer to his judgment.
In fact, I guess that if we break @clayui/css that could mean that all packages that depend on it can also include the breaking change and thus need to be updated to v4?
^^^^^^ This!!
We will have design changes in 7.4 (always happens unless you have secret info). This will require changes in markup, css, and components. How do we shield 7.3 users from inadvertent breaking changes in 7.4?
Our React components don't have much IE stuff, but patching to 7.3 still applies. If we remove IE related code from our React components, how do we patch without new features possibly causing unintended consequences?
I think forking a 3.x branch of everything is the safest. If we still don't want to do that I prefer:
1) Leave IE stuff as is in Clay CSS add new features that still work in IE. Remove IE in Clay 4.
2) $ie_support
or _ie.scss
, remove IE in Clay 4.
Removing IE isn't going to reduce the file size by much, IE11 has good flexbox support.
^^^^^^ This!!
With "can also include breaking changes" I didn't mean it in the sense that we had the option to do so π
We will have design changes in 7.4 (always happens unless you have secret info).
I don't have secret info, but I honestly hope there won't be. I think our visual identity is by now mature-ish stable and we shouldn't expect it to change, at least until a major release. @victorvalle might have more insights about that, though.
Removing IE isn't going to reduce the file size by much, IE11 has good flexbox support.
Based on this, I'd say the best thing to do is to do nothing.
No changes that I know or can predict right now. We would let you know with time if that happens.
Okay, closing as discarded :)
As part of Remove IE11 Support, we should be taking steps to remove IE11 support, hacks and workarounds from our code.
clay@3.x
goes to older branches of DXP, so doing this might mean we need to increase clay to4.x
or decide not to do this at all (see π )@clayui/css
. Can't see anything in our React components that would be relevantI personally think the benefit of removing code here is not enough to warrant us forking the library, so my first inclination is to stay put. In any case, I thought we should have this conversation :)
One option that came to mind was to add a Sass variable
$ie_support
and wrap all those IE specific fixes in anif
clause. For DXP7.4.x
we can set it tofalse
to save some extra bytes...@wincent, @pat270, @bryceosterhaus, @matuzalemsteles, anyone else... thoughts on this?