mariohmol / ang-jsoneditor

Angular Jsoneditor that works with angular 4 to angular 15
https://stackblitz.com/edit/angular-json-editor
MIT License
156 stars 89 forks source link

Main menu, navigation, and status bars are missing by default with latest dependencies #133

Open tbdrake opened 9 months ago

tbdrake commented 9 months ago

Describe the bug The main menu, navigation, and status bars are documented as enabled by default, but with latest versions of this library and dependencies they do not show up by default.

To Reproduce Steps to reproduce the behavior:

  1. Open StackBlitz template: https://stackblitz.com/edit/ang-jsoneditor. Note that main menu and navigation bars are present (status bar only applicable in code or text mode): image
  2. Click DEPENDENCIES > Update All to Latest
  3. Note that main menu and navigation bars are no longer present: image StackBlitz fork showing the issue

Expected behavior Main menu bar, navigation, and status bars are enabled by default as documented here:

  /**
   * Adds main menu bar - Contains format, sort, transform, search etc. functionality. True
   * by default. Applicable in all types of mode.
   */
  public mainMenuBar: boolean;

  /**
   * Adds navigation bar to the menu - the navigation bar visualize the current position on
   * the tree structure as well as allows breadcrumbs navigation.
   * True by default.
   * Only applicable when mode is 'tree', 'form' or 'view'.
   */
  public navigationBar: boolean;

  /**
   * Adds status bar to the bottom of the editor - the status bar shows the cursor position
   * and a count of the selected characters.
   * True by default.
   * Only applicable when mode is 'code' or 'text'.
   */
  public statusBar: boolean;

Desktop:

Additional context I encountered this issue in an Angular 16 application. We noticed that the main menu bar, navigation bar, and status bar disappeared after updating the application dependencies. To address the issue, we explicitly set the options to true in our application:

    this.editorOptions.mainMenuBar = true;
    this.editorOptions.navigationBar = true;
    this.editorOptions.statusBar = true;