When enabling the module, all HTML features should be enabled by default.
This would seem to be more sensible than having to enable all the features one by one.
Users that don't want a particular feature can still disable it.
Patch forthcoming.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | better-install-1260970-3.patch | 12.89 KB | alanburke |
Comments
Comment #1
alanburke commentedIt turns out that they are - but by using hook_install.
There should be no need for that.
Comment #2
alanburke commentedPatch for this attached
Comment #3
ericduran commentedI'm all for removing the hook_install I don't like it.
But regarding all features should be enabled by default. I'm not so sure, I think all the module features should be disable by disabled and user should then select which feature they'll like to have enabled.
Comment #4
amateescu commentedCommited! Thanks :)
http://drupalcode.org/project/html5_tools.git/commitdiff/fee0dd27c151b44...
Comment #5
alanburke commentedI disagree with this.
When a user enables this module, I would argue that they expect these features by default, and should opt out of they don't need it.
JohnAlbin was suggesting [at the Drupalcon London code sprint] that there should be no opt-out at all.
It a feature is useful enough to make it into this module, then that should be enough - don't let users option out.
It would clean up the code somewhat if that option was removed.
Comment #6
amateescu commentedSorry Eric, I commited the patch before seeing your comment. I agree with John Albin and Alan Burke here, if the user wants html5 stuff and they install this module, they should see the change right away :)
Comment #7
ericduran commentedChanging to needs work because there's a bug in the code. But I'll explain my thoughts behind this before the bug.
I'm still not sure, I get what people are saying, but modules don't just enabled their settings by default thats just mean.
We also change the html.tpl.php that is used, these aren't nice changes to just do without approval from the user.
If we want we can add an enable all feature so anyone could easily toggle on an off the modules settings.
But essentially there's two types of module:
Type 1 - Module that you enabled and it does everything its going to do, and to turn it off you disable the module.
Type 2 - Module you enabled and you get new settings to enable and disable.
Sadly we're the type 2 kind of module, so we really shouldn't enabled all the features by default. It will be like installing views and it enabling the front_page view as soon as you enabled it. Not nice :-)
But back to the bug,
having the variable_get return 1 for the html5_tools_override_views_field_rewrite_elements variable doesn't have the desire effect you would be expecting.
The user will still will need to go to the form and save it in order to get the new Elements available to views.
Changing back to needs Work.
Comment #8
ericduran commentedI fix the bug with this commit -- http://drupalcode.org/project/html5_tools.git/commit/73f5976
Sorry but I remove having the views elements overwrite default to 1, This is because it needs to be saved in order to take affect, so having that check-box display checked is wrong and mis-leading.
I'm open to another way around it.
Comment #9
ericduran commentedMarking it as fixed, I'll leave the value checked by default, even thought I don't agree, we'll see what people think.
Thanks for the patches :)
Comment #10
ericduran commentedSwitching to closed, because I like the issue queue being empty ;-) as always feel free to open the ticket if you feel is not fully closed.