Once your breakpoints are defined in your themes .info file and the module picks them up, they cannot be modified or deleted!! Even if modifying or deleting them in the .info file doesnt get reflected in the module, they are there for good when initially defined. Even disabling, uninstalling then enabling the module doesnt help.

Files: 
CommentFileSizeAuthor
#12 my_breakpoints.zip2.29 KBattiks

Comments

attiks’s picture

Version:7.x-1.0» 7.x-1.x-dev
Component:User interface» Code
Assigned:Unassigned» Jelle_S

We need to backport the 'reload from theme' functionality from the Drupal 8 version, see http://drupalcode.org/project/breakpoints.git/blob/refs/heads/8.x-1.x:/b...

But uninstalling should work, can you check that the breakpoints table gets deleted after uninstalling?

hass’s picture

Title:Can't delete theme breakpoints» Can't add/delete theme breakpoints

I have added breakpoints to my themes. Cleared all cached several times and they are still not loaded. What's wrong here?

attiks’s picture

can you try disabling your theme, clear all caches and enable it again.

hass’s picture

Is this the way how it is designed to work?

attiks’s picture

#4 breakpoints module acts on hook_themes_enabled and that's the only moment when theme breakpoints are read.

hass’s picture

Other theme setting are also refreshing if I change them and clear the caches. The current logic is not ok. Themes are changing and breakpoints may too.

attiks’s picture

I never said the logic was ok, see #1 the code exists in the 8.x branch, it needs a backport to D7. Patches are welcome.

hass’s picture

Aside, my themes are configurable via theme setting. Therefore the breakpoints are dynamic like page widths, sidebar widths, columns and so on and so on. Just as a side note that is not related here - I'm adding css files, js and settings also dynamically to the theme via template.php. Need the same for breakpoints...

How is this handled by D8 and D7 module here? Is there a info hook that breakpoints module calls to get the current breakpoints?

attiks’s picture

"Is there a info hook that breakpoints module calls to get the current breakpoints?" No, breakpoints are imported when a theme or module is enabled, but you can create custom breakpoints (and groups) that get stored inside database/config.

There's a branch for Drupal 8 containing the new UI: http://drupalcode.org/project/breakpoints.git/shortlog/refs/heads/core_ui

Related issues:
#1775302: Do a UX review of Breakpoint module
#1813126: Awesome breakpoints & gridbuilder UI

attiks’s picture

#8 You want to manage your breakpoints on the appearance page? Or do you want to export your breakpoints to js?

hass’s picture

The themes allow users to change the width, columns widths and number of columns, min width, etc on appearance page. With the values they configured I need to calculate and set the breakpoints based on their settings. They will not configure the breakpoints as I know, where they are based on their settings. Therefore this values need to be "refreshable".

attiks’s picture

StatusFileSize
new2.29 KB

#11 So you to create them on the fly, since breakpoints and groups are exportable you could implement hook_default_breakpoints and hook_default_breakpoint_group, I attached a feature containing the export of a group.

Only thing you probably have to do is clear the cache using ctools_export_load_object_reset after the theme settings are saved.

attiks’s picture

Assigned:Jelle_S» Unassigned
Category:bug» support
Priority:Major» Normal
Status:Active» Fixed

feel free to re-open if needed

hass’s picture

Has the backport from #1 done?

attiks’s picture

Each theme settings page should have a new button to reload

hass’s picture

This is worse usability. If I open the appearance page I expect it is up to date all times. After I press save, too. Everything else is a usability fail.

attiks’s picture

As said in #13, feel free to re open this issue and feel free to submit a patch.

hass’s picture

Category:support» bug
Status:Fixed» Active
DrupalNovice’s picture

Version:7.x-1.x-dev» 7.x-1.1

Hello,

I am facing the same problem. Fresh install of Drupal 7. I've defined the breakpoints in my themes .info file like so:

breakpoints[mobile] = (min-width: 1em)
breakpoints[wide] = (min-width: 60em)

I've tried changing the default theme back and forth, cleared the caches, disable/enable the module, but the breakpoints are still not loaded from the .info file to the UI.

attiks’s picture

At the bottom of the theme settings page you should see a new button to reload the theme info, do you see it?

DrupalNovice’s picture

Ah, how did I miss that.. now it works perfectly.

Thank you for this nice module :)

hass’s picture

Version:7.x-1.1» 7.x-1.x-dev
joachim’s picture

> At the bottom of the theme settings page you should see a new button to reload the theme info, do you see it?

I see it, but it's not easily discoverable.

After adding or changing breakpoints in my theme info file, I expected one of the following to cause them to get noticed:

- refreshing the breakpoint admin page
- clearing the cache

Neither does it.

A mention of where to find this button in the help text on admin/config/media/breakpoints would suffice to fix this UX bug.

attiks’s picture

Issue summary:View changes
Status:Active» Fixed
hass’s picture

Status:Fixed» Active

The bug is not fixed. Documenting a bug does not fix it.

attiks’s picture

Status:Active» Closed (fixed)

THis is fixed a long time ago, only thing left is adapting the documentation.

hass’s picture

There was not commit message on the case. Can you add the commit link, please?

Jelle_S’s picture

Status:Closed (fixed)» Fixed

from #23:

After adding or changing breakpoints in my theme info file, I expected one of the following to cause them to get noticed:

- refreshing the breakpoint admin page
- clearing the cache

Neither does it.

A mention of where to find this button in the help text on admin/config/media/breakpoints would suffice to fix this UX bug.

In the latest dev, breakpoints are reloaded from theme .info files when the cache is cleared (420b57c)

  • Commit 420b57c on 7.x-1.x by Jelle_S:
    Issue #1869968 by jamienotweet: Fixed Can't add/delete theme breakpoints...

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.