Comments (6)
Multiple navigations occurring roughly simultaneously should never happen in the first place. That's bad, and undefined, behavior as-isβi.e., it's broken even without an override.
Maybe I'm not seeing the full picture here, but my gut reaction is that if end user code is doing bad things, then fix that code.
from sugarcube-2.
There are other use-cases for cancelling transition.
For example, you may wish to prevent all navigation if some condition is not met. Yes, every link could be modified to include that conditional check (perhaps as a widget), but it would be much easier to be able to globally prevent the transition without creating a new moment (as navigating back to the passage would do).
from sugarcube-2.
Personally it sounds like a foot-gun solution to a situation that should be handled by a better designed custom interface, and I can see potential confusions when trying to debug a request for help.
Why show the end-user what appears to be a selectable link that actually isn't.
from sugarcube-2.
Personally it sounds like a foot-gun solution to a situation that should be handled by a better designed custom interface, and I can see potential confusions when trying to debug a request for help.
Why show the end-user what appears to be a selectable link that actually isn't.
A practical example. At the end of one game I transitioned to a Death passage, but wanted to show the text from the previous passage to indicate how the user died. On that passage I would like to shut down all links. I think I did it by modifying the links themselves, but an override would have made it a lot easier.
In the end, this is something more than one person has suggested (e.g. see Maliface's pull request: https://github.com/tmedwards/sugarcube-2/pull/302/files). I'd be interested in what harm you think having such a method in the Engine would cause?
from sugarcube-2.
I think I did it by modifying the links themselves, but an override would have made it a lot easier.
But this feature wouldn't of visibly disable those links, so from the end-user's point-of-view they would still be selectable options , unless some other method was being used to force those links to appear disabled, and if this is the case then why isn't that method also being used to make those links actually unselect-able?
So using this purposed method of "disabling" a link results in a potentially confusing situation where nothing happens (1) if one of those selectable links are selected, thus a badly designed User Experience, and thus breaking the principle of least astonishment / surprise.
(1) and I understand that JavaScript could be used in the handler to notify the end-user, but that would happen after a selection was made.
eg. the old "Please do not press this button again" scene from Hitchhikers Guide.
Is there a potential need to be able to disable multiple links at a time, Maybe. But that functionality also needs to make it clear that those links have been disabled, and more importantly why! And this is where things become complex, because if there is one set of such links then there could potentially be multiple such sets, and it's likely that each set will have its own why.
from sugarcube-2.
That is one of my primary concerns. You have no method of notifying the caller why or even how a link should be disabled.
from sugarcube-2.
Related Issues (20)
- ``` ``` seems to be discarded by 2.37.0 alpha 17 HOT 2
- Add a method to make truly modal Dialog elements HOT 3
- Unused code in develop/State.prngCreate HOT 3
- Link markup does not recognize HTML Symbol entities HOT 2
- Add setting to reduce impact of expired moments HOT 2
- bookmark information missing from documentation for v2.37.0 HOT 1
- Suggestion: improve warning for Save size in 2.37.0 docs.
- Twine stacks multiple versions of file when you import to web version, export, then import to desktop version. HOT 3
- Let DOM macros fail silently as a config option HOT 2
- Missing `Engine.show()` after `unmarshallForSave()` is called. HOT 5
- Config.passages.transitionOut bug
- feat: allow errors to propagate extra information upstream
- Please enhancd docs to include example Setting ChangeHandler HOT 7
- <<do>> tags not processing comments properly. HOT 1
- Please add to the documentation what content is allowed in "desc:" strings
- Document when done macros are run in the Navigation Event section. HOT 9
- Verbatim String as macro argument HOT 2
- Serialize all save slots and deserialize them without loading a specific slot HOT 7
- ReqTypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sugarcube-2.