OpenWaterFoundation / owf-app-infomapper-ng

Open Water Foundation InfoMapper web application for menu-driven maps and visualizations, using Angular
GNU General Public License v3.0
1 stars 2 forks source link

Need application menu `visible` property #338

Closed smalers closed 3 years ago

smalers commented 3 years ago

The application configuration menus now has an enabled property that will show the menu in gray. There is also a need for visible 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.

Nightsphere commented 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.

smalers commented 3 years ago

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.

Nightsphere commented 3 years ago

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:

  1. Main Menu
    • enabled
    • visible
  2. Menu (Called SubMenu in the InfoMapper)
    • 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.