Closed smalers closed 3 years ago
The visible property was added to the InfoMapper in Issue #85, see comment https://github.com/OpenWaterFoundation/owf-app-infomapper-ng/issues/85#issuecomment-629052483. Any menu or submenu that does contains "visible": "true"
(or does not have the property, which will show by default) will show the menu. Setting "visible": "false"
will not show the menu or submenu at all. Closing the issue.
Given the importance of this property and potential for confusion, I'm requesting that the value be allowed to be a quoted string or a boolean. Do the same for "enabled" and other booleans. Unlike the GeoMap configuration file, the application configuration file is not as complex and hopefully utility code can be used to handle boolean properties.
There is currently no tool to build the application configuration file so text editor is used. This makes it easy to forget whether string or boolean is used. In general, if a property value is not parseable due to type issues, a console message should be printed to help map creators.
In the future, we'll probably build a web "InfoMapper builder" that creates the application configuration file.
I have merged the new changes for this. Every implemented boolean property has the option to be written as a string or a straight boolean in the app configuration file. As of now, that is:
enabled
visible
enabled
separatorBefore
visible
I have seen the doubleSeparatorBefore
issue as well, and when I implement that - along with all boolean properties from now on - it will have the same options.
With the most recent push I have also got the infomapper-types.ts
file working now. This has all globally Typed interfaces and enums used throughout the InfoMapper, such as objects from the app config file, map config files, and event files. Importing has been cleaned up as a result, and it will really help with code Typing and structuring of object creation in the future, especially as we create more properties and attributes.
Closing this issue.
The application configuration menus now has an
enabled
property that will show the menu in gray. There is also a need forvisible
property that will ignore adding menus to the application. This is useful when adding new functionality that is not ready for public access. Being able to hide ensures that the feature can be turned on later. The property should be available for main menu items and submenus.Once enabled, I will add to the InfoMapper documentation.