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

Choice block automatically displays “condition” settings #2272

Closed
brylie opened this issue Jun 9, 2024 · 9 comments
Closed

Choice block automatically displays “condition” settings #2272

brylie opened this issue Jun 9, 2024 · 9 comments

Comments

@brylie
Copy link

brylie commented Jun 9, 2024

The problem

Adding a choice automatically displays conditional item “if … “

To Reproduce
Steps to reproduce the behavior:

  1. Download and install the latest pre-release (Alpha 14)
  2. Create a timeline
  3. Add a choice block
  4. Hit the plus to add a choice option
  5. Notice that the block contains a partially functional “condition” block

Expected behavior
The condition should be hidden until the user clicks the disclosure triangle.

Screenshots
If applicable, add screenshots to help explain your problem.

I’m creating this issue on my mobile phone, sorry 🙂

System (please complete the following information):

  • OS: Windows
  • Godot Version: 4.2.2
  • Dialogic Version: 2 alpha-14

Solutions

Workaround
We were able to work with the choice, but it was confusing 🫤

Possible fixes

Any idea to fix the issue or a link to the line of code that might be the cause for this problem

@brylie brylie changed the title Choice block automatically displays partially functional “condition” sub-block Choice block automatically displays partially “condition” settings Jun 9, 2024
@brylie brylie changed the title Choice block automatically displays partially “condition” settings Choice block automatically displays “condition” settings Jun 9, 2024
@Jowan-Spooner
Copy link
Collaborator

Hmm... this is not a bug, but an intentional design decision. Any event that has settings in it's body will be opened when first created, because people often just didn't notice that the events even had expandable bodies, and also it's annoying to always have to unfold the body, especially when adding events (the body will be hidden when opening the timeline later).

Maybe we should rather make the UI more clear that if nothing is entered there the condition will be considered true and thus have no effect?

@brylie
Copy link
Author

brylie commented Jun 12, 2024

Ah that makes sense. I was confused by the UX since we weren’t using conditional logic to display the choice in our initial prototype.

By the way, in what section of the documentation should there be a description of the features and use cases for each timeline block type?

@Jowan-Spooner
Copy link
Collaborator

Unfortunately we have not gotten around to making documentation for all the events yet.

@brylie
Copy link
Author

brylie commented Jun 14, 2024

I’d like to help with documentation. What is the recommended structure?

@CakeVR
Copy link
Collaborator

CakeVR commented Jun 14, 2024

You can learn everything about the documentation here: https://github.com/dialogic-godot/documentation/

@brylie
Copy link
Author

brylie commented Jun 14, 2024

Thank you. FWIW, I was working with a friend to use Dialogic in a game project and we encountered some errors where we had somehow accidentally entered some text in the condition settings which caused the timeline to keep crashing. It was a fairly opaque error which had us stumped. We ended up removing the choice from the timeline and re-adding it to get things working again.

@Jowan-Spooner
Copy link
Collaborator

If you remember what you entered to cause the bug, feel free to create a bug report!

@brylie
Copy link
Author

brylie commented Jun 14, 2024

I think we had just accidentally clicked the input and maybe hit a random letter like q, so it wasn't a bug per-se but a confusing UX. Granted, we're learning Dialogic so understand that most of the responsibility is on us for making mistakes. I think the UX here could be a bit simpler by hiding the conditions at first and clearly showing the disclosure triangle for advanced users who need to set conditions on the choices 😄

Jowan-Spooner added a commit that referenced this issue Jun 24, 2024
This changes the syntax of the choice event a bit:
```
- Choice Text | [if Condition] [shortcode="value"]
- Choice Text | [shortcode="value"]
- Choice Text
```
*The old syntax without | still works though.*

This also adds a new extra_data field to choices. This data will be provided to choice buttons so they can now be uniquely identified and given arbitrary information. This would be even cooler, if the dictionary field would be nicer looking. 
- fixes #2286

This also makes it so you have to press a button to enable the condition on choices, which looks much better. 
- fixes the UX problem #2272

This also fixes a bug with visual editor fields not having the correct value if they start hidden and are then revealed by a condition changing.
@Jowan-Spooner
Copy link
Collaborator

I have improved the UX of the choice condition for the next version.

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