Skip to content
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

Option to hide Buttons Visibility with a Button Action #1301

Closed
Robjones6146 opened this issue Nov 17, 2023 · 11 comments
Closed

Option to hide Buttons Visibility with a Button Action #1301

Robjones6146 opened this issue Nov 17, 2023 · 11 comments

Comments

@Robjones6146
Copy link

Option to hide Buttons Visibility with a Button Action

Is it possible to hide a button after it has been activated or stop it from being activated a second time during a roast?

I have tried activating another palette with the button visibility OFF, but could not get that to work.
I have requested an Are you sure? YES/CANCEL option Popup feature when a button is clicked (hopefully someone can add this)

Reason:
I have a lot of automation going on, Artisan also talks to outside software that does some stuff. Clicking my Load Bean - START button does 6 separate operations if this button is accidentally clicked during a roast this will result in loading the beans for the next roast. I also have other buttons that activate a sequence of events when clicked.

Possible solutions:
Config >> Alarm >> Action >> Deactivate Event
Config >> Events >> Buttons >> Action >> Artisan Command >> visibilityOff(<Button number, true/false>)

Thank you in advance.

@roasterdave
Copy link
Contributor

I have tried activating another palette with the button visibility OFF, but could not get that to work.

I just tested this and it works properly in v2.8.4 and in the continuous build.

2palettes

@Robjones6146
Copy link
Author

I am on Artisan 2.8.5 (e969944) but that should not make a difference

Thanks, how did you do that?

@roasterdave
Copy link
Contributor

I am on Artisan 2.8.5 but that should not make a difference
No difference. As stated above I took the time to test both the continuous build (v2.8.5) and v2.8.4.

Thanks, how did you do that?
Two palettes each with three buttons. Button number 2 has Visibility OFF in palette #2. Button 3 uses the Artisan Command palette(<p>) to switch between palette #1 and palette #2.

issue1301_palettes.aset.txt

@Robjones6146
Copy link
Author

Robjones6146 commented Nov 17, 2023 via email

@Robjones6146
Copy link
Author

Robjones6146 commented Nov 17, 2023

My palette on/off button disappears every time. It doesn't save when I save the Palette file.
I have tried everything ... always removes the palette buttons after they are clicked.

@MAKOMO
Copy link
Member

MAKOMO commented Nov 17, 2023

Daves example works as described. Also saving and loading the palettes to via an .apal file works. Note: the currently selected palette is not changed by loading palettes from an .apal file. The currently selected palette is part of the the system state and stored along the Artisan settings.

@MAKOMO
Copy link
Member

MAKOMO commented Nov 17, 2023

I have requested an Are you sure? YES/CANCEL option Popup feature when a button is clicked (hopefully someone can add this)

Please don't mixup things and open a separate feature request. Note that to my assessment it is very very unlikely that someone implements this feature if not yourself. The project is open to contributions via PR which will be carefully reviewed and if productive on all platforms integrated.

@Robjones6146
Copy link
Author

Thanks, I see that his example works, but I can't get mine to work, I cant find any helpful documentation on this, I am sure I am doing something wrong, I need some help, thats all.

I created the 2 palettes, saved them, then saved the settings, then I clicked the newly created button, and it dissapeared, that happens every time, no matter what I do. I currently have two saved pallettes, saved to my settings file.

"I have requested an Are you sure? YES/CANCEL option Popup feature when a button is clicked (hopefully someone can add this" - I was mentioning a request I made a few weeks ago for the same problem I am facing. #1268

If I knew how to code, I would make it.

@Robjones6146
Copy link
Author

I can only assume that my settings are somehow interfering with this. I cannot get it to work no matter what I try.
I have attached my settings file

settings.txt

MAKOMO added a commit that referenced this issue Nov 17, 2023
…`i` to `b` which has to be an expression which evaluates to a boolean, like 0, 1, false, true, ... (Issue #1301)
@Robjones6146
Copy link
Author

Finally figured out this complicated process. For anyone with the same issue.

In Events >> Buttons, create your buttons (on or off) including an (Artisan Command) for palette(1), lets call that button default palette
Now go to Palettes.
In current box write default, now select store #1 and then click Store Palette
Next you must save the palette

Now create the next palette
-- repeat the process above
close the Event dialog
Now you must save the settings in Help

@Robjones6146
Copy link
Author

Thank you all for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants