New Bangle.js 2 menu system

Posted on
Page
of 5
Prev
/ 5
Last Next
  • I've added Color item and submenu.


    1 Attachment

  • Maybe it's me but all I can do with this is scroll it up and down. Touching or tapping on a submenu has no effect

    In the demo, most of the submenus aren't implemented. The one labelled 'submenu' is though.

    Color

    That looks like a good idea, but I'm a bit concerned it's adding quite a lot of extra code for something that isn't used that much (and what if someone wants to specify something that's not one of those 8 colors?).

    However, it made my realise that now we can include images inside strings, it's actually as easy as writing:

      "A Color" : {
        value : 3,
        min:0,max:7,
        format : v => {
          var col = g.toColor(v&1,(v&2)>>1,(v&4)>>2);
          return String.fromCharCode(0,16,16,0x41,col>>8,­col&255)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0­\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";­
        },
        onchange : v => { number=v; }
      },
    

    Obviously that's a little cryptic, but we could maybe create some libraries to make it easy to provide this kind of functionality on top of the existing menu system, such that it only gets included when needed?

    (also right now it displays a square, but you can adjust the /0/0.... code to make it display whatever shape or glyph you want)

  • I've just merged this into the main builds, so if you try a cutting edge build now, you should get the new menu system by default.

    Right now, the 'checkbox' only appears if there's a boolean value with no format function, but pretty much all apps do provide a Yes/No style format - so I think once this is released we'll have to run through all the apps removing the format functions (someone may still want to do a boolean value with a custom format, so I'm not sure we can just ignore it)

  • There seems to be some problems. After updating to 2v12.27 on Bangle.js 2, pressing the button showed "Loading" for a moment and then continued showing the clock instead of going to launcher. This happened few times but then it started working.

    I have the default Anton Clock.

  • The one labelled 'submenu' is though.

    Yes tried that as well, sat there touching, dragging, stroking - no response.

    I will try the cutting edge firmware.

    UPDATE: updated to 2.12.27 and seems to be working! Looks really nice.

    For the menu labels that are 2 words and wrap on 2 lines, could the font be a bit bigger?


    1 Attachment

    • download (3).png
  • Great, thank you!

    I installed it before lunch and I played with it for a while. I like it, the UI now is much more usable!

    • I got some random freeze here and there. Three times in a row the bangle freezed in Settings -> App -> Pedometer Widget . I had to long-press the button to reboot (I think this is an issue with the widget itself)
    • I'm not a fan of the red "back" button in the widget bar (what if my bar is full of widgets?) - a swipe gesture should be better in my opinion (maybe a setting?)
    • Could the menu name be show in a E.showMessage style instead of hamburger + name? (see screenshot)


    1 Attachment

    • title.png
  • That looks like a good idea, but I'm a bit concerned it's adding quite a lot of extra code for something that isn't used that much (and what if someone wants to specify something that's not one of those 8 colors?).

    Yes, that is right.
    May be then it will be helpful just to add a "drawItem" callback? with (idx, item, x1,y1,x2,y2) params. There one can do whatever is needed after the item is rendered a standard way.

  • The elimination of the red button at the top left and the possibility to go back by swiping right would be perfect.
    Also, I would leave the same font size even when words wrap.
    Less confusion and greater readability.

  • furthermore, again for greater readability, I would increase kerning if possible.

  • I'm not a fan of the red "back" button in the widget bar

    I'm not keen on that either. I think middle BTN to go back works fine and there is no need for the extra touch control to go back.

  • leave the same font size when words wrap...greater readability.

    The samller font for the word wrap case is just a bit too small.

  • I've just flashed this and I agree. The back button doesn't fit in somehow, is easy to miss when touching, and can be confusing because it isn't there when you are e.g. in the multiple choice screen. Aesthetically I also preferred the way the title was displayed before (centred with a horizontal rule rather than the hamburger icon). On the whole though, this feels like a huge improvement.

  • Had a screen freeze when using the new menu, had to long press reboot.
    Had a 2nd screenfreeze when selecting a radio button, not repeatable though

  • so I think once this is released we'll have to run through all the apps removing
    the format functions

    So here lies the advantage of having a firmware tag in the metadata.json file.
    I now have 2.12.27 on my watch, with the lovely new menu system.

    I have spotted that adding a new Yes/No item no longer works as it stays as No when I go back into settings after just setting it to Yes. So I have changed my code to remove the format. But now I really should update the other 2 boolean settings in my pastel.settings.js.

    But if I do I break my app for everyone else who is on firmware prioor to 2.12.27 if I check in the code. SO now I am blocked from checking in further changes to my app OR I have to revert to old firmware and implement the settings as per the format way.

    I'd much rather be able to checkin my code with a firmware:2.12.27 tag in metadata.json, knowing that if someone loads the latest version of Pastel then they will be invited to upgrade the firmware if they have firmware prior to 2.12.27.

  • There's something strange with the LCD brightness settings: only value 0.1 is allowed.


    2 Attachments

    • 2.png
    • 1.png
  • @Alessandro thanks - I'll get a fix in for that.

    I have spotted that adding a new Yes/No item no longer works as it stays as No when I go back into settings after just setting it to Yes. So I have changed my code to remove the format.

    Can you give me a really small code example that shows the issue? This sounds like something in the new menu system that needs fixing maybe?

    This is an example of why I don't want per-version numbering at the moment :) the menu system is very much in development right now. I don't want people making hacks in their code just because of an issue that existed in the cutting edge firmware for a few days :)

    re: the back button and title. I feel that's very much personal preference. Before the next full release I'll be trying to add some kind of configurable 'back' functionality.

  • Ok, just fixed LCD brightness (and any numeric item with a 'step' value)

    Had a screen freeze when using the new menu, had to long press reboot.

    If you can find any way to reproduce that, please let me know...

    @HughB I know you mentioned the font above. Right now we use a 20px high font for the main text, and supposedly a 15px high font for the 'small' text. I think a 3/4 size scaling is probably right in this case, but the font size is not remotely right.

    I'm looking at replacing the built-in bitmap fonts, so I hope at some point soon we'll be able to have some more sensible font options - so we can have a smaller size without the whole style of the font getting changed.

  • How do we plan to cater for B1 and B2. We could end up having to have different settings code for each?

    Could Yes/No's be treated as a straight boolean in B2 or could that create more issues down the line?

    I have updated to 2.12.32 - no issues spotted so far.

    I'm looking at replacing the built-in bitmap fonts.

    Wow @Gordon - Sounds like improvements are coming in thick and fast now :) Really apprecite the work and support you give Bangle.

  • Ok, just fixed LCD brightness (and any numeric item with a 'step' value)

    Thank you, the menu seems ok now!


    Another problem: the bangle freezes & reboot after some settings update (see attached video) It seems to happen only when Vector font is on) I noticed a similar issues yesterday while changing the pedometer widget settings (without the automatic reboot)


    1 Attachment

  • You have default clock set to Anton Clock.
    I can create a hang by changing the Anton clock settings from No->Yes->No etc.

    BUT i think this is due to Yes/No options not being handled anymore by the new Menu System.
    It might also be an issue with the Anton Clock as I cant reproduce changing Yes/No options in the Pastel Clock.

  • Changing colors in settings>system>theme>customize is strange. It seems like selecting colors works, but the display always shows the same color. Just updated from .27 to .32, but the problem is still there.

  • I tried reinstalling settings and locale, but nothing helped. All other settings pages seem to work fine.

  • I've just fixed the theme customize based on your other post @RaoulDuke

    Could Yes/No's be treated as a straight boolean in B2 or could that create more issues down the line?

    Not really, since with the most recent translation stuff they'd change based on the language that was uploaded :( On B2 Yes/No should still work fine - they just display yes/no and not the checkbox.

    Best bet is probably to update the Bangle.js 1 showMenu to display a checkbox too?

  • I installed 2v12.33 and tried the new menu system and it's a huge improvement over the old version, especially no accidental click instead of scrolling anymore.
    Thanks a lot for implementing this :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

New Bangle.js 2 menu system

Posted by Avatar for Gordon @Gordon

Actions