bitfocus / companion

Bitfocus Companion enables the reasonably priced Elgato Stream Deck and other controllers to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
Other
1.64k stars 505 forks source link

[BUG] 3.5+7435 Reordering pages breaks 'Set to page' buttons #3082

Open JStrauber opened 1 month ago

JStrauber commented 1 month ago

Is this a bug in companion itself or a module?

Is there an existing issue for this?

Describe the bug

On the latest Beta of 3.5, testing working with the new Pages setup where you can reorder / add / remove pages. Noticing if I have buttons / pages that set to other pages, for example setting a table of contents to link to other pages, if the pages are reordered, the 'Set to page' command still references the same 'page number' and doesn't follow the desired page itself.

Steps To Reproduce

  1. Build a button with 'internal: Set to page' and set it for current surface, then another page listed
  2. Add a new page before the existing destination page or move the existing page
  3. The 'Set to Page' button still points to the previous 'page number' which may be a different page or blank page

Expected Behavior

  1. Build a button with 'internal: Set to page' and set it for current surface, then another page listed
  2. Add a new page before the existing destination page or move the existing page
  3. The 'set to page' destination follows the set page no matter what page number it is

Environment (please complete the following information)

Additional context

No response

Julusian commented 1 month ago

This is expected currently, and is unlikely anything we can fix with the current actions. I do intend to add some new actions which reference a page id (instead of page number), and so will follow the page as it gets moved. But these haven't been done yet

While in theory we could update page numbers as you move things around, I think that it will be very easy to make a bigger mess. Maybe you are reordering because you want to change what page 2 including with these actions.
Or you delete page 2, should those actions remain referencing page 2, or something else? If you then insert a new page 2, those actions could now be pointing to 3. Is that what should happen?

JStrauber commented 1 month ago

So in our case we're doing a setup where we are going to add new pages vaguely frequently (thank you for the more than 99 part!), and as part of organization we'd like to keep everything grouped together rather than just adding to the end. What would help us in this case is to be able to 'link' the button to a specific page, so that way if we rearrange the pages, it doesn't break all the links. For now, we know that we'll have to update if we move things around, which is fine.

"If you then insert a new page 2, those actions could now be pointing to 3. Is that what should happen"

This functionality would be great, to your point I get that it might not be best for everyone. I wonder if at some point there could be a selection where you can choose to set to page 'by number' and set to page 'by name', or something along those lines. Like, default could be always follow the selected page number, but you could check a box so it would automatically follow the intended 'page' if it moves in the list order.

So in this case, currently, if I add another 'Monitor Pg' in this list, I would then have to go back and edit all other pages that reference every higher page. It would be great to have it so that you can have the buttons follow the 'intended' page and not just the number. I can see benefits to both ways, which is why I suggest some sort of toggle. My guess is being able to follow a specific 'page' would require each page to have a separate type of UID other than just the page number or name, especially if someone used duplicate names.

Julusian commented 1 month ago

@JStrauber replying by email doesn't support attaching images (it looks like you tried to add an image) and for some reason the formatting is all messed up too, its lost all the newlines..

JStrauber commented 1 month ago

So in our case we’re doing a setup where we are going to add new pages vaguely frequently (thank you for the more than 99 part!), and as part of organization we’d like to keep everything grouped together rather than just adding to the end. What would help us in this case is to be able to ‘link’ the button to a specific page, so that way if we rearrange the pages, it doesn’t break all the links. For now, we know that we’ll have to update if we move things around, which is fine.

“If you then insert a new page 2, those actions could now be pointing to 3. Is that what should happen” This functionality would be great, to your point I get that it might not be best for everyone. I wonder if at some point there could be a selection where you can choose to set to page ‘by number’ and set to page ‘by name’, or something along those lines. Like, default could be always follow the selected page number, but you could check a box so it would automatically follow the intended ‘page’ if it moves in the list order.

(See screenshot attached)

So in this case, currently, if I add another ‘Monitor Pg’ in this list, I would then have to go back and edit all other pages that reference every higher page. It would be great to have it so that you can have the buttons follow the ‘intended’ page and not just the number. I can see benefits to both ways, which is why I suggest some sort of toggle. My guess is being able to follow a specific ‘page’ would require each page to have a separate type of UID other than just the page number or name, especially if someone used duplicate names.

Image

digitaldrummerj commented 1 month ago

To get around the current behavior of not updating the pages when they move, I create a variable for each page that I want to use in the "Set Page To" action so that I only need to update a single variable when the page moves and all of the buttons get updated.

davidjoshuaford commented 1 month ago

I've been looking at the same issue -

I don't think moving pages should change the linked Actions for "Set surface to PAGE NUMBER", but it would be helpful to have an Action that could "Set Surface to PAGE NAME".

That way pages can be reordered however you like and the page name keeps the integrity of the surface jumps.

Would have to be unique page names though, so perhaps generating a new page would auto name it New Page 2, New Page 3 etc.

It would be helpful if these could accept custom variables to be able to jump to specific pages.

For example, I have seven AUDIO pages AUDIO1, AUDIO2, AUDIO3 etc. So an Action to set a Surface to a page name variable such as "AUDIO$(internal:custom_audio_page)" would help simplify which audio page to jump to.

Also a question about Expressions in the page name, would a name like "AUDIO-1" potentially be an issue with a minus operation? ie better to name it AUDIO_1?