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

SubModules #37

Open
wants to merge 54 commits into
base: dev
Choose a base branch
from
Open

SubModules #37

wants to merge 54 commits into from

Conversation

JulienCochuyt
Copy link
Member

@JulienCochuyt JulienCochuyt commented Jul 22, 2024

To ease maintenance of WebModules for very convoluted web applications and as a step towards pluggable WebModules targetting common web pages overlays (such as chat boxes), we decided to enrich WebAccess with the support of SubModules.

A SubModule is on its own a regular WebModule, but it shares the browsed document with other WebModules.
More specifically, the document URL (or window title) still triggers loading of a parent WebModule, which has nothing special but some Zone Rules with the new subModule property set with the name of child WebModule, aka SubModule.
The SubModule can still be used on its own with the usual triggers.
When loaded in a Zone by its parent, it simply ignores the document outside of the Zone.
The parent, once it has loaded the SubModule, won't try to match Rules within the Zone of its child.
There is no intended limitation regarding the depth of nesting. SubModules can in turn host SubModules.
Hence, Zones free nesting is a pre-requisite to SubModules.

Gestures behave however differently: The gestures associated with Markers or Zones in a WebModule are active only when the reading position is within the Zone containing the SubModule - or outside for the root parent.

A new Rule Type is also introduced: Global Marker.
In the absence of SubModules, it mostly behaves like a regular Marker, but circumvents the above mentioned intended limitation of regular gesture binding.
When the gesture associated with a Global Marker is issued, it is first looked up in the SubModule at the current reading position. Then, it is looked up in all other Sub Modules of the same parent. As a last resort, it is lastly looked up in the parent which is expected to provide a default behavior or informative error message.
When such a gesture is issued at a reading position not belonging to any SubModule, these still have priority over their parent.
In the event of deep nesting, a SubModule first forwards the look-up to its children before answering itself.

This new Rule Type is intended to, for example, provide web-application-wide global gestures such as those needed to conveniently answer phone calls through a telephony applet which is used on several web application of the same organization.
Another example is to provide unified gestures for interacting with nested tabs among all the applications displayed on the same portal.

Additionally, a new Criteria is introduced: Document URL
It allows to match a Rule on iFrames when there is no more convenient attribute available such as a class or ID.
Note there might be a significant performance drawback in using it too intensively as the document URL of nested documents is commonly omitted on the regular accessibility interfaces and as such requires a special look-up on its own.

Lastly, the WebAccess GUI has be enhanced to aid editting of SubModules:

  • Rules editting is now possible even when their WebModule is not load.
  • The WebAccess menu actions such as Rule Creation or Rules Management is targeted to the SubModule at the current reading position.
  • The Edit WebModule menu entry proposes when suitable a list of the currently active WebModules from the reading position up to the document root.

@JulienCochuyt JulienCochuyt force-pushed the feature/subModules branch 9 times, most recently from 000a680 to 33ee539 Compare July 25, 2024 16:48
@JulienCochuyt JulienCochuyt mentioned this pull request Jul 26, 2024
@JulienCochuyt JulienCochuyt force-pushed the feature/subModules branch 12 times, most recently from 16d76cf to 7efa923 Compare August 26, 2024 00:33
@JulienCochuyt JulienCochuyt force-pushed the feature/subModules branch 4 times, most recently from 532fda2 to f6b68eb Compare August 26, 2024 11:55
@JulienCochuyt
Copy link
Member Author

JulienCochuyt commented Aug 26, 2024

@frederic-brugnot, @AAClause ,
Very early alpha ready for first feedbacks

  • Control Mutation is at this stage not expected to work in SubModules
  • The GUI currently offers no friendly way to create a new "SubModule only WebModule". Workarround: Fill "::SubModule::" as trigger URL.
  • Rules offline editing (Rules offline edition #42), however, is expected to work on this branch.

JulienCochuyt and others added 21 commits October 17, 2024 17:39
This fix would also cover cases of custom mutation template, even if there are no
such thing yet.
 - Bump version to 2024.09.17-dev+subModules
 - Replace the "Actions" category by "Input Gestures"
 - Rename the corresponding module and classes
 - Bump version to addon_version" : "2024.09.18-dev+subModules
For the test, the "multiple" property is forced to ensure the user is informed
about all potential matches. Hence, the rule type "marker" is forced as the
"multiple" property is not supported for every rule types.
Rather than filtering out properties that are not supported for markers, simply
drop them all as they have no impact on result matching anyway.
Eases creation of subclassed Results by custom WebModules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants