$screen helper #37
-
Let's chat about this. Discussion point: Should we hardcode external frameworks settings inside the plugin, ask the user to specify the breakpoints somewhere, or just give a sensible default (documented) and allow the user to override it easily. My personal view is that people tomorrow will question why X, Y, Z are supported but the new A framework is not, so I'm not a fan of giving those configurations here. On the other side, I'm not sure that asking people to define breakpoint by themselves would be a good idea so I'm a bit torn. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 29 replies
-
I would go with defining breakpoints by user instead of writing in the code. I am not sure what path would be the best to define these breakpoints only once and let $screen helper to initialize it. Perhaps we could at least provide tailwindcss grid as default and a way to provide override? @KevinBatdorf for your suggestion on callback, what would be the use case? Even there is one, can we just use My add on to this helper would be providing I used the have this idea of having a way to set Alpine related configurations to make almost anything configurable, but i think this would be a better approach for V3. (Not sure if there is still V3 roadmap tho) |
Beta Was this translation helpful? Give feedback.
-
Another topic, should the debounce should be an option you can pass in? |
Beta Was this translation helpful? Give feedback.
-
I'm going to open a new discussion point for the second iteration of the |
Beta Was this translation helpful? Give feedback.
I would go with defining breakpoints by user instead of writing in the code. I am not sure what path would be the best to define these breakpoints only once and let $screen helper to initialize it.
Perhaps we could at least provide tailwindcss grid as default and a way to provide override?
@KevinBatdorf for your suggestion on callback, what would be the use case? Even there is one, can we just use
$watch
helper for that?My add on to this helper would be providing
touch
detection, maybeportrait
andlandscape
mode as well.I used the have this idea of having a way to set Alpine related configurations to make almost anything configurable, but i think this would be a better approach for V3.…