Skip to content

Add css-dependency-comments based on jQuery Mobile #1440

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 1 commit into from

Conversation

rxaviers
Copy link
Member

@rxaviers
Copy link
Member Author

Need someone to review the CSS references. Don't worry with the paths for now. It's important that all CSS files are being referenced and they are correct (each JS is correctly referencing its CSS'es).

@@ -13,6 +13,9 @@
//>>description: The core of jQuery UI, required for all interactions and widgets.
//>>docs: http://api.jqueryui.com/category/ui-core/
//>>demos: http://jqueryui.com/
//>>css.structure: ../themes/base/base.css
Copy link
Member

Choose a reason for hiding this comment

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

Why would we reference this anywhere? Its just a bunch of @import statements.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, removed by ed74d55

@rxaviers
Copy link
Member Author

@jzaefferer said:

Out of scope of this PR, but would be good to figure out: Both draggable.css and sortable.css are there simpy to define touch-action: none; for handles. We could move this to core.css as a generic class. @tjvantoll @scottgonzalez thoughts?

I'm repeating his question here, because it will get lost as soon as I push an update.

@scottgonzalez
Copy link
Member

Regarding touch-action: none;, I think we'd want to wait a bit and see how it's being used in the wild, especially with Chassis.

@jzaefferer
Copy link
Member

Wait and see is fine to me. With the (more) explicit dependencies in place, it'll be reasonable to change.

@arschmitz
Copy link
Member

So in general things that don't actually depend on a css file should not depend on it in comments here either I would say. Any other use kinda breaks the meaning of "dependency".

@rxaviers
Copy link
Member Author

Removed theme.css from all effects.

@arschmitz
Copy link
Member

There is no agreement on how button CSS should be defined yet.

I don't think this is true at all actually. What I said was that we discussed, and any widget which depends on it, will include it explicitly. This is not yet an issues however as no widget does. It is only an issue once the re-write for button lands and i will update that PR once this one lands.

@rxaviers
Copy link
Member Author

any widget (that) depends on (button.css) will include it explicitly ... once the re-write for button lands.

Ok.

@rxaviers
Copy link
Member Author

Based on the conversation we had so far, below is the CSS dependency list I understood for each ui/*js.

UI Core

  • core.js: none
  • widget.js: none
  • mouse.js: none
  • position.js: none

Interactions

  • draggable.js: draggable.css
  • droppable: none
  • resizable.js: core.css, resizable.css, theme.css
  • selectable.js: selectable.css
  • sortable.js: sortable.css

Widgets

  • accordion.js: core.css, accordion.css, theme.css
  • autocomplete.js: core.css, autocomplete.css, theme.css
  • button.js: core.css, button.css, theme.css
  • datepicker.js: core.css, datepicker.css, theme.css
  • dialog.js: core.css, dialog.css, theme.css
  • menu.js: core.css, menu.css, theme.css
  • progressbar.js: core.css, progressbar.css, theme.css
  • selectmenu.js: core.css, selectmenu.css, theme.css
  • slider.js: core.css, slider.css, theme.css
  • spinner.js: core.css, spinner.css, theme.css
  • tabs.js: core.css, tabs.css, theme.css
  • tooltip.js: core.css, tooltip.css, theme.css

Effects

  • effect*: none

@scottgonzalez @jzaefferer @arschmitz please, can you confirm?

@jzaefferer
Copy link
Member

Droppable is missing, datepicker is listed twice.

Do interactions actually depend on core.css? I don't think so.

@rxaviers
Copy link
Member Author

rxaviers commented Feb 1, 2015

Droppable is missing

There's no droppable.css. Does it still depend on core.css? Or no CSS at all?

@rxaviers
Copy link
Member Author

rxaviers commented Feb 1, 2015

datepicker is listed twice.

I've updated my above comment removing the duplicate.

@jzaefferer
Copy link
Member

You've listed other components with "none", so it makes sense to list droppable as well. Afaik none of the interactions except resizable need core.css.

@arschmitz
Copy link
Member

@jzaefferer @rxaviers that had been my understanding on interactions as well. Only resizable needs it for the icon.

@rxaviers
Copy link
Member Author

rxaviers commented Feb 1, 2015

Great, thank you @jzaefferer and @arschmitz. I've updated my above comment listing droppable and updating other interactions.

@jzaefferer
Copy link
Member

Looks good to me

@rxaviers
Copy link
Member Author

rxaviers commented Feb 2, 2015

Please, could you re-check?

@scottgonzalez
Copy link
Member

Looks correct.

@rxaviers
Copy link
Member Author

rxaviers commented Feb 2, 2015

Great thanks

rxaviers added a commit to jquery/download.jqueryui.com that referenced this pull request Feb 4, 2015
- Handle CSS dependencies from JS comments (based on jQuery Mobile);
- Use archive-packager, builder-amd and builder-jquery-css to build UI 1.12.0
  download package;

Fixes #178
Fixes #255
Ref jquery/jquery-ui#1440
@rxaviers
Copy link
Member Author

rxaviers commented Feb 4, 2015

Updated

@rxaviers
Copy link
Member Author

rxaviers commented Feb 4, 2015

https://gist.github.com/rxaviers/01ab3bc43bf9f42c769f can be used to test building the CSS bundle.

@@ -12,6 +12,8 @@
//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
//>>docs: http://api.jqueryui.com/spinner/
//>>demos: http://jqueryui.com/spinner/
//>>css.structure: ../themes/base/spinner.css
Copy link
Member

Choose a reason for hiding this comment

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

Missing core.css

@jzaefferer
Copy link
Member

Can you rebase this on master?

@rxaviers
Copy link
Member Author

rxaviers commented Feb 5, 2015

Rebased

@rxaviers rxaviers force-pushed the ref-1029-css-dependency-comments branch from c24f6f0 to edf7dc4 Compare February 5, 2015 12:03
@jzaefferer
Copy link
Member

Looks like the structure.css file is just concatenated, that is, all the header comments are still there. Do we keep those and leave them to the minifier to remove?

@rxaviers
Copy link
Member Author

rxaviers commented Feb 5, 2015

Looks like the structure.css file is just concatenated, that is, all the header comments are still there. Do we keep those and leave them to the minifier to remove?

The scope of this PR is making sure CSS dependencies are being correctly defined. Although, that's a good question for jquery/download.jqueryui.com#178 (or its PR jquery/download.jqueryui.com#256). Currently, the individual banners are stripped out when they are concatenated. So, we can keep doing it unless we don't want to worry about it anymore.

@jzaefferer
Copy link
Member

Seems fine to ignore that. Unless someone else wants to review this as well, this is good to land.

@rxaviers
Copy link
Member Author

On today's meeting, the decision was to drop theme.css as a dependency for all JS components. Whether to include it or not will be a manual decision made by the developer/user completely independent of the used JS components. The structural CSSes are still kept (listed as dependencies for a JS component) though.

More details can be found on http://irc.jquery.org/%23jquery-meeting/default_%23jquery-meeting_20150211.log.html

@jzaefferer
Copy link
Member

On today's meeting, the decision was to drop theme.css as a dependency for all JS components.

I don't think that was the consensus. As I understood it: We keep the comments in the JS files. We do nothing with them, for now. We have the option to warn the user, using the DB UI, when they're selecting components that soft-depend on the theme while no theme is selected. The latter should be filed as a separate ticket.

@scottgonzalez
Copy link
Member

@jzaefferer Correct, that's what was decided.

@rxaviers
Copy link
Member Author

Ok, so #1440 (comment) will be kept.

@scottgonzalez
Copy link
Member

So I think this is correct. @jzaefferer @arschmitz @rxaviers Can you all confirm?

@rxaviers
Copy link
Member Author

Confirmed. The changes are correct according to what we have defined.

@jzaefferer
Copy link
Member

👍

@rxaviers rxaviers closed this in 45744ef Feb 26, 2015
@scottgonzalez scottgonzalez deleted the ref-1029-css-dependency-comments branch March 18, 2015 00:44
rxaviers added a commit to jquery/download.jqueryui.com that referenced this pull request May 20, 2015
- Handle CSS dependencies from JS comments (based on jQuery Mobile);
- Use archive-packager, builder-amd and builder-jquery-css to build UI 1.12.0
  download package;

Fixes #178
Fixes #255
Ref jquery/jquery-ui#1440
rxaviers added a commit to jquery/download.jqueryui.com that referenced this pull request Jul 14, 2015
- Handle CSS dependencies from JS comments (based on jQuery Mobile);
- Use archive-packager, builder-amd and builder-jquery-css to build UI 1.12.0
  download package;

Fixes #178
Fixes #255
Ref jquery/jquery-ui#1440
rxaviers added a commit to jquery/download.jqueryui.com that referenced this pull request Jul 22, 2015
- Handle CSS dependencies from JS comments (based on jQuery Mobile);
- Use node-packager, builder-amd, builder-jquery-css, and
  jquery-ui-themeroller to build UI 1.12.0 download package;
- Cache support;

Fixes #178
Fixes #255
Ref jquery/jquery-ui#1440
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.

5 participants