Skip to content

Core: Split up into individual modules #1569

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

Closed
wants to merge 41 commits into from

Conversation

arschmitz
Copy link
Member

This breaks the core file up into small individual modules and updates all their dependencies

@jzaefferer
Copy link
Member

How about putting these into their own folder? Or moving widgets into a folder? Something something with less clutter?

@arschmitz
Copy link
Member Author

In mobile we have a widgets folder

@arschmitz
Copy link
Member Author

Though moving the core stuff into its own folder is a lot easier since it wont require changes to every test file :-)

@jzaefferer
Copy link
Member

I'd be fine with a core folder. Or shared, utils, platform, helpers, plugins, tools...

@arschmitz
Copy link
Member Author

This now moves the widgets into their own folder and the effects into their own.

@jzaefferer
Copy link
Member

Folder changes look good.

This still deletes ui/core.js, ticket supposedly said to keep that with imports to all the extracted modules (Trac is down, can't check).

There's missing deprecation comments for disable/enableSelection and $.ui.ie (not sure why I had that comment on data.js, didn't belong there).

@arschmitz
Copy link
Member Author

@jzaefferer ill add the comments and file but this actually is missing updating all the demos adding that right now.

@jzaefferer
Copy link
Member

Why do some of the new files have copyright and AMD-property headers (like "//>>label"), others don't, e.g. ui/form.js?

@arschmitz
Copy link
Member Author

I followed what the convention seemed to be already if its a file that is a "public" method that will show in DB it gets a header if its a private micro module it does not.

@jzaefferer
Copy link
Member

There's no file that specifies ui/version.js as a dependency. I guess the recreated ui/core.js will, but that is also just temporary. How will the file get included in a UI build afterwards?

@arschmitz
Copy link
Member Author

@jzaefferer thats correct nothing should depend on. IT will be in the core. After it will have to be hard coded into the build. How is this handled today if you only select components that do not depend on core?

@jzaefferer
Copy link
Member

I guess its just missing. I'd be fine with moving it back to core.js and just deleting it entirely when the time comes. We still have version properties on each widget, along with the file headers.

@jzaefferer
Copy link
Member

Reviewed the rest of the commits, didn't notice any other issues. Will do some actual testing when demos are updated.

@arschmitz
Copy link
Member Author

@scottgonzalez what are your thoughts since you said to make this its own module?

@arschmitz
Copy link
Member Author

@jzaefferer demos are updated

@scottgonzalez
Copy link
Member

I don't actually have a good answer for this. I'd say that we should just make version a dependency on everything, but I'm not sure if that'd be annoying for users doing custom builds.

@jzaefferer
Copy link
Member

Can we make this file (more) useful by having everything depend on it, and drop the $.ui definition everywhere else?

@scottgonzalez
Copy link
Member

Sounds ok to me.

@arschmitz
Copy link
Member Author

Widgets already have @Version defined and define their namespace if it does not exist. This is also not a "dependency" things function just fine with out it. I think it would make since for all the "core" files to depend on it maybe but not widgets.

@scottgonzalez
Copy link
Member

It's not a dependency in terms of needed functionality, but we always expect the version to be there. I'd prefer to have the widgets declare it as a dependency as well.

@arschmitz
Copy link
Member Author

@scottgonzalez it seems like we should remove it from the prototype of individual widgets then as it just seems redundant.

@scottgonzalez
Copy link
Member

It's not redundant. The version is in the prototype so that you can check the version on an instance. This is useful since you can load multiple versions simultaneously.

@arschmitz
Copy link
Member Author

@jzaefferer this is good to go again full passing tests on all commits

};

} ) );
( function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should mark this file as deprecated.

@arschmitz
Copy link
Member Author

@jzaefferer updated

@jzaefferer
Copy link
Member

What do we need the remaining concat grunt task for? The output isn't used anywhere. Whoever built the 1.10 npm package still hasn't updated it to 1.11, so there's no point in worrying about that - though we should be publishing jQuery UI on npm...

@@ -14,334 +14,24 @@
//>>docs: http://api.jqueryui.com/category/ui-core/
//>>demos: http://jqueryui.com/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this as well.

@arschmitz
Copy link
Member Author

@jzaefferer anything else on this?

@jzaefferer
Copy link
Member

Demos link in ui/core.js and grunt concat task, see comments above.

@arschmitz arschmitz closed this Aug 3, 2015
@arschmitz arschmitz deleted the core-breakup branch August 3, 2015 13:09
@arschmitz arschmitz reopened this Aug 3, 2015
@jzaefferer
Copy link
Member

Remove the now unused dependency, then this is good to land.

@arschmitz
Copy link
Member Author

Doing it now

@arschmitz
Copy link
Member Author

Closed in eeb9620

@arschmitz arschmitz closed this Aug 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants