Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

FR: how about a Solo button for Matrix elements? #3116

Closed
narration-sd opened this issue Jul 19, 2018 · 6 comments
Closed

FR: how about a Solo button for Matrix elements? #3116

narration-sd opened this issue Jul 19, 2018 · 6 comments
Labels
enhancement improvements to existing features live preview 👁️ features related to Live Preview matrix 🕶️ features related to Matrix fields

Comments

@narration-sd
Copy link
Contributor

narration-sd commented Jul 19, 2018

Description

Here's the thing. Let's say you have a carousel running on a page, with the slides loaded as would be natural from a Matrix. Now, try to edit one of the slides in Live Preview. That's the scene you won't have trouble to imagine -- the slide of interest is not showing on each reload unless its the first, or is running off soon if you do catch it, etc..

I was thinking first along the lines of giving a choice on the menu with Disable, to Disable All Others. But that's not quite right either -- when it turns to Enable All Others as would be natural, that isn't necessarily what you'd want. Maybe you already have some that are disabled, and want them to stay that way.

Then the idea came. What's needed should operate like the button that is found on each channel in an audio mixing board, hardware or software realized. It doesn't affect the set state of other channels -- just defeats them all when you want to hear the single one. Punch it again, etc., and those other channels which were enabled come back.

Simple to describe, explain, and use; possibly not quite simple to encode, but given how Live Preview operates, shouldn't be so bad? That thing you mentioned to me about states transferring back and forth on the client side might be a trip-up, but not worse than what's already going on, yes?

This seems to me a very nice feature to have, once you realize. If you'll know how I might have gotten into it -- in fact, you have the commented movie rushes. Futures arrive :) , and cheers....

p.s. Really glad you guys got your holidays, if also as diligent bus men, and wouldn't have sent you the film if had realized you were still on them, think you'd know.

Additional info

  • Craft version: Version 3 dev-develop current
@brandonkelly
Copy link
Member

Interesting idea, but I’m not sure how we could intelligently know which parts of the template to turn off vs. leave in view. You would still need all the layout HTML, for example, and it wouldn’t be possible for Craft to tell how much beyond that is safe to remove without breaking the page styles.

That said, we do plan on implementing #1489, which would provide a way for you to manually assign alternative Live Preview views. So you could create a custom target that displays your Matrix blocks in a non-carosel UI.

@narration-sd
Copy link
Contributor Author

Hey, Brandon, appreciate your thoughts and concerns.

Seems this is a much simpler thing, though, along with its high utility, and if I haven't missed something.
Pictures to show, and then a note or two which address implementation.

Here's the CP view of client's site-in-progress, with Solo buttons added as they might look:

slides-normally

And here's how the matrix would present, with Solo clicked for the top matrix element:

slides-soloed

So, you see, the only things happening are that, per matrix element:

  1. The Soloed block is enabled and expanded, if it wasn't -- with its prior state of just these two factors remembered
  2. The non-Soloed blocks are disabled and collapsed -- with the two factors' prior state similarly remembered
  3. When the Solo button is released, the remembered states are re-applied, so that in the demo, you get back the first picture exactly
  4. The state adjustments and memories only are needed for the Matrix block you're on, as the others won't be edited and need Live Preview changes at the same time.

Hoping this is a lot simpler than what you were thinking about.

And...just realized afresh that the slider source I'm showing here is actually implemented in Neo (there is a c3-dev).

So who I have to convince is also Ben/Neo and the SuperTable guys.

But if you do it yourself, in Craft style, many content building persons will be happier with Live Preview, and this will definitely aid the case for their happiness with the plugin guys also, no?

Plugin guys will get to see your code for implementing it nicely, maybe can just call then-available
Garnish.

@brandonkelly
Copy link
Member

Ahh, sorry misunderstood.

@brandonkelly brandonkelly reopened this Jul 21, 2018
@brandonkelly brandonkelly added enhancement improvements to existing features matrix 🕶️ features related to Matrix fields live preview 👁️ features related to Live Preview labels Jul 21, 2018
@narration-sd
Copy link
Contributor Author

narration-sd commented Jul 21, 2018

Great -- just caught this.

And I'm reconsidering point 4 -- surely people would solo different blocks at the same time, sometimes, even if they can only watch one change at a time. It's a natural content-enterer sort of move.

But I don't think this should make implementation harder; it just means more memories to be kept. Handy to have in mind for their container design, though, would imagine...

Cheers, and enjoy your week-end back -- Bend is nice, and not less this time of year, I remember ;).

@narration-sd
Copy link
Contributor Author

narration-sd commented Aug 27, 2018

Here's an example of Solo in the tools field -- just noticed GitKraken is using it.

Their implementation is a little awkward, but above for Craft seems straightforward.

solo moves - gitkraken

@narration-sd
Copy link
Contributor Author

Additions to round out the Solo button feature, from further thought:

  • Solo mode should automatically cancel, whenever a full Save is done, or the Entry Edit page is otherwise fully left, such as accepting an leaving-page Cancel.
  • This will avoid confusion during editing.
  • Solo could well be kept operating over a Ctrl/Clover-S/menu Save-And-Continue. This will be convenient for someone who is familiar with editing.
  • Fundamentally, Solo should operate only for the Edit session. This will keep it from ever interrupting live operation of the site, whether or not it is actively being employed.
  • having Solo operate only in the Edit session, plus the Ctrl-S feature just above, will make it easy for an Editor to both smoothly continue editing, and occasionally observe the overall result.

@craftcms craftcms locked and limited conversation to collaborators Jun 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement improvements to existing features live preview 👁️ features related to Live Preview matrix 🕶️ features related to Matrix fields
Projects
None yet
Development

No branches or pull requests

2 participants