-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Upgraded ExtJS to 1.1.1 #2473
Upgraded ExtJS to 1.1.1 #2473
Conversation
In an attempt to reduce the size of the bundle, here's an updated build script. I am basically seeing what can be removed from the files array. 224KB -> 168KB (a 25% reduction). #!/bin/bash
files=(
source/core/Ext.js
source/adapter/prototype-bridge.js
source/core/DomHelper.js
# source/core/Template.js
# source/core/DomQuery.js
source/util/Observable.js
source/core/EventManager.js
source/core/Element.js
source/core/Fx.js
# source/core/CompositeElement.js
source/core/UpdateManager.js
# source/util/DelayedTask.js
# source/util/TaskMgr.js
source/util/MixedCollection.js
source/util/JSON.js
# source/util/Format.js
# source/util/CSS.js
# source/util/ClickRepeater.js
# source/util/KeyNav.js
# source/util/KeyMap.js
# source/util/TextMetrics.js
source/dd/DDCore.js
source/dd/ScrollManager.js
source/dd/Registry.js
source/dd/StatusProxy.js
source/dd/DragSource.js
source/dd/DropTarget.js
source/dd/DragZone.js
source/dd/DropZone.js
# source/data/SortTypes.js
# source/data/Record.js
# source/data/Store.js
source/data/Connection.js
# source/data/DataField.js
# source/data/DataReader.js
# source/data/DataProxy.js
# source/data/MemoryProxy.js
# source/data/HttpProxy.js
# source/data/ScriptTagProxy.js
# source/data/JsonReader.js
# source/data/ArrayReader.js
source/data/Tree.js
source/widgets/Component.js
source/widgets/BoxComponent.js
source/widgets/Layer.js
source/widgets/Shadow.js
source/widgets/Editor.js
source/widgets/tree/TreePanel.js
source/widgets/tree/TreeSelectionModel.js
source/widgets/tree/TreeNode.js
source/widgets/tree/AsyncTreeNode.js
source/widgets/tree/TreeNodeUI.js
source/widgets/tree/TreeLoader.js
source/widgets/tree/TreeFilter.js
source/widgets/tree/TreeSorter.js
source/widgets/tree/TreeDropZone.js
source/widgets/tree/TreeDragZone.js
source/widgets/tree/TreeEditor.js
source/widgets/form/Field.js
source/widgets/form/TextField.js
)
# License Header
printf '/**\n' > ext-tree.js
printf ' * Ext JS Library 1.1.1\n' >> ext-tree.js
tail -n +2 LICENSE.txt | sed -e 's/^/ \* /' >> ext-tree.js
printf '\n */\n' >> ext-tree.js
# Concat files
for file in "${files[@]}"; do
tail -n +8 $file >> ext-tree.js
printf '\n\n\n' >> ext-tree.js
done
# License Header
printf '/**\n' > ext-tree.min.js
printf ' * Ext JS Library 1.1.1\n' >> ext-tree.min.js
tail -n +2 LICENSE.txt | sed -e 's/^/ \* /' >> ext-tree.min.js
printf '\n */\n' >> ext-tree.min.js
# Concat files
for file in "${files[@]}"; do
file=${file//source/build}
file=${file//\.js/-min\.js}
tail -n +8 $file >> ext-tree.min.js
printf '\n\n\n' >> ext-tree.min.js
done
dos2unix ext-tree.js
dos2unix ext-tree.min.js |
In the repository can be the normal and the reduced size. I don't agree with only one reduced version. Such a format is supposed to be final, for production, free of issues and we all know that this is impossible. To check the code we have to make another step but when I propose a PR in a minified version it will be difficult for others to follow. Classic coding is preferred for the project (my opinion). |
I did not find any references in the code related to files:
All files in CSS directory are from Ext JS Library 2.0. |
I see
I'm not sure yet either the reason for
Normally I agree. In this case I don't want to include the entire ExtJS library since we only use a very small subset, but I should be able to include a non-minified source of each file I'm concating together. |
This pull request fixes 1 alert when merging d0b9975 into 8297316 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 03ab001 into 8297316 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 22950cc into 8297316 - view on LGTM.com fixed alerts:
|
I removed a lot of files that I don't think are needed at all. Maybe too much, but I left only files that are used by Mage as far as I can tell. There's a slight chance that some 3rd party extension used some of these JS components, but I really doubt it. Because if they did they would have been limited to the ones Magento team chose to bundle into In any case, I say to get rid of all this old JS. One day when we want to modernize the JS stack, we will be thankful that there is less crap to go through. |
do you think this is ready for test? |
@fballiano yes I think it’s ready. I forgot it was marked draft, I’ve been out of town last few days. |
This pull request fixes 1 alert when merging e58a2d4 into b370350 - view on LGTM.com fixed alerts:
|
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.
tested both categories and products mask work fine.
e58a2d4
to
7070b3d
Compare
This pull request fixes 1 alert when merging 7070b3d into 00748ce - view on LGTM.com fixed alerts:
|
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.
All good after testing the mentioned pages
fixed conflict, could you re-test just to be sure? |
Hi Sorry, I missed this comment earlier. I will check it now, but do we still want to target 1.9.4.x with this PR? Not sure if we've changed thoughts on this. Edit: I bring up the question of target branch because of my comment above:
Just in case that some module breaks on the extjs upgrade, it may be better to leave out of 1.9.4.x and target 20.0. |
@fballiano I don't recall off the top of my head, but I'll take a look a bit later today or tomorrow morning at the latest. I'll also rebase to v20 while I'm at it. |
@fballiano I believe I had just manually removed all things not related to ext-tree from the CSS file. The reason I missed that class is that it's not from I've re-added that class & rebased to 20.0 |
😂😂 |
@justinbeaty super, seems to be perfect now. I see a few missing classes ( |
@fballiano yeah, I noticed those |
agree, let's merge and see if something comes out we'll fix it later :-) |
Yes, I don't see anything creating
So I think we are all good. |
With all the recent changes we should take a look into the browser console and do an audit. There is a small chance that there are still issues related to ZF1-Future and what was removed that we aren't aware. |
@ADDISON74 I checked all three pages mentioned in the initial comment with the browser console opened. No errors. |
Description (*)
Thanks to @fballiano for pointing this out on discord.
ext-tree.js
is version 1.0.1 in our source. I've updated to 1.1.1 which was the last 1.x release (apparently 2.x was BC-breaking). I also updated the bundled resources (CSS and images)It turns out
ext-tree.js
is not just the tree component from ExtJS, but a custom build of ExtJS. I had to recreate this from theext-1.1.1.zip
archive.Source is available here: https://web.archive.org/web/20130401000000*/http://dev.sencha.com/deploy/ext-1.1.1.zip
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
There are the files
fix-defer-before.js
andfix-defer.js
. The former looks like an MSIE7 fix. The latter I'm not sure, but possibly some polyfill or browser fix. It's probably worth looking into what those both do.There is also the
ext/css
dir which contains files that look like they're from ExtJS 2.0. I'm not sure what they're doing there and I don't see usage of them.Contribution checklist (*)