Git Product home page Git Product logo

Comments (30)

nilsbenson avatar nilsbenson commented on September 26, 2024 1

pushed the dynamic-list branch. everything should work as it does now but the drawing of the list, number of items, etc is all runtime-based.

each family of resources has an updated SteakMenuLayout and a strings.xml. The layout sets a handful of parameters that adjust screen locations, spacing, etc. so that the layout can be controller for each screen size.

image

  • itemOriginX: the left X position of the list of steaks excluding the selector
  • itemOriginY: the top Y position of the list of steaks and the selector
  • listItemOffsetY: the vertical spacing/padding between items in the list
  • selectorOriginX: the left X position of the selector on the screen
  • font: the font to use for the text for each item
  • listJustification: the text justification to be used. probably doesn't work well if not set to LEFT
  • selectorColor: the color to use for the selector marker
  • itemColor: the default color for list item text
  • targetOriginX: the left X position of the target time text on a row / in a list item
  • flipOriginX: the left X position of the flip counter text on a row / in a list item

The code to draw the list is in source/drawable/SteakListDrawable.mc
The code that wraps up a steak/entry/status is in source/SteakEntry.mc

strings.xml contains a single entry in the device-specific resources
image

"maxSteaks" defines the number of steaks to create and display in the interface. so taller screens can fit more and smaller screens fit less.

SteakMenuView (contains)-> SteakListDrawable (references/draws) -> App.Controller.getSteaks() (returns) -> array of SteakEntry

The controller is still the holder of truth for the steaks, the max number, etc. Each SteakEntry knows about it's name/label, its current status, the timeout/target/etc values.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024 1

for the dynamic entries I think we focus on two main areas:

  • making the UI super clean per-device (within reason)
  • fleshing out user settings and options (again within reason)

I looked at your comment about app settings and I'm surprised there is no way to persist them in the 1.x CIQ. Seems like an oversight to me.. However, we can still support those options on the older SDK devices the user will just have to make sure they opt in or opt out when they start the app.

  • pick sensible defaults for activity and GPS tracking
  • allow the user to access a settings menu from the welcome screen
  • allow the user to enable or disable activity/GPS tracking
  • persist this option when we can (2.4.x) possibly with App Settings (so they can be configured from the phone too)

I'll push an experiment I was working on to the dynamic-list branch. I purchased the glyphicon font pack for a different project and converted a handful of the icons to bitmap fonts. This allows us to draw super-clean icons that we can use to denote functionality for the watch buttons, etc. It also allows us to use regular XML layouts most of the time so positioning the icons is easy to do with the simulator.

Personally I'd like to support as much functionality as possible across all devices for a couple of reasons:

  • it's good experience because you end up having to touch many different parts of the toolchain
  • at the end of the day we can make this as flashy as we want, but it is still a timer and the basic timing functionality should work without issue on pretty much every device.

Also, it's a simple app in general but if we do a good job cleanly supporting the full range of devices and "growing" with them maybe we can win the developer award next year and we'll both get new devices. lol.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024 1

I think this is probably fine for a first pass. The glyphicon pack has a toggle on/off so we can use those.

image

image

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024 1

take a look at how the count is managed. there is some weirdness when adding multiple items of the same type that I saw. Set a type, then change it, etc.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

I had a day full of conference calls yesterday that I didn't really need to be on so I had some time to prototype this out a bit. It combines a custom drawable "dynamic" list with with device-specific layouts to control locations and spacing of the entries which at least allows us to control the number of items displayed based on screen size and shape. Once it's not crashing I'll push the branch and associate it to this case.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

This branch is incredible! This is getting serious now. Your changes will make it very easy to address many things (#34, #36, #37)

I patched a typo and pushed the changes.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

Question, by "dynamic list" you mean "variable length" list based on screen real state available in different watches?

I'm asking because at some point we discussed the list being dynamically sorted based on timer expiration. Closest timers to expire go on top. I have now doubts whether this feature would be practical. It would require much more user interaction in case you want to stop a timer. For example, you are closing in for the 4th and final flip. The timer goes to the top of the list, gets red and you're done. If you forget to stop it, then it goes in the background (e.g., disappears) then good luck chasing it. You would need to wait until it comes back. Even if it does not disappear and you have custom names, chasing timers in a dynamically sorted menu would be a bit of a nightmare.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

I agree, and by dynamic I do mean both "unlimited" and "appropriate for the screen size". I'm not sure we want to do the sorting at all but I do think it's a cool idea. I actually think for simplicity on the watch we either provide reasonable default sizes for the specific device, and/or allow the user to set the number of entries shown.

We could add the ability to scroll the list to have entries that are off-screen and be able to scroll them in but I think that's probably not a fantastic UI for the watch. Hitting buttons and scrolling around for what you're interested in is a little cumbersome and I think should probably be avoided where possible.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

Many of the other open Issues are orthogonal to this. I agree, let's focus the effort on this branch. How do we split the workload? What other features do we want to suppor in the dynamic-entries future release?

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

I pushed a blank Settings layout that is accessible from the welcomeLayout and implements a back button to return.

The glyphicon icons are killer. They look super cool.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

This is a nice summary of CIQ compatiblity per device.
https://developer.garmin.com/connect-iq/compatible-devices/

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

I added DataStore.mc to provide persistence to <key, value> pairs. There are restrictions into what can be stored.

  • Keys can be of the following types: String, Number, Float, Boolean, Char, Long, Double
  • Values can be of the following types: String, Number, Float, Boolean, Char, Long, Double, BitmapResource, AnimationResource, null

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

For the Settings layout. Would it be too limiting if we had two columns <option, status>, and a single button (accept) to toggle that option?

Perhaps a nice icon could indicate the on/off status.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

I spent some time reading the code associated to the SteakMenuLayout and was very educational.

However, for the SettingsLayout we have just a couple of options and I think customizing it would be the best option. I pushed a mockup including the glyph_3_toggle_on. I guess it looks a bit strange because the only available glyph is the @Fonts.FONT_GLYPH3_SMALL and the labels are FONT_NORMAL.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

I can generate larger versions of the icons. It's a manual process to take the TTF font, pick the icons, export to the PNG tileset, and manually up the FNT text file with the ASCII codes to map to each icon so I did as little as possible the first time.

I'll generate additional 24x24 and 32x32 icons which should help. We probably need to dig through the devices.xml and see what the configured font heights are for the different sizes on different devices before I go through that though so we know that we've generated the appropriate set.

The license for the font was unlimited use in unlimited projects so I'm going to add the TTF to the repo so you can see what all is available. The current set is a very small subset of everything that's there.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

image

https://stock.adobe.com/images/id/84514948?as_campaign=Flaticon&as_content=api&as_audience=srp&tduid=d30cbb705cdfbe622997daeaebc7cfca&as_channel=affiliate&as_campclass=redirect&as_source=arvato

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

The license is a little pricey at $80 but the outline icons are clean and since they're EPS we can easily convert them to good looking bitmaps or bitmap fonts.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

Is EPS the best way to convert? The Adobe icon set is cool. I checked the flaticon and some have EPS format for download (e.g., https://www.flaticon.com/free-icon/burger_2933054?term=hamburger&page=1&position=8). Perhaps we can find close enough icons for free.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

I'm good with free. The EPS format is nice because it's a vector format (it's postscript) which means we can scale them up and down without loss of quality. We can use Inkscape to load / generate sized PNG, etc.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

We can try how the number after the icon looks, but I have the feeling that the position of the icon in the screen is easier to associate than a number. I'll work on the number today and we can discuss whether we like it or not.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

sounds good. I tend to agree - the number probably doesn't add much context for the user that the icons and position don't already provide.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

Oh I just saw the latest version. I see the steak# is already there. We can leave it as is for now.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

Perhaps the weirness comes from my last push. If I create two burgers (burger#1, burger#2) on the first two rows. If I'm done with burger#1 I stop the timer so it doesn't vibrate. If I decide to start a new timer on that row (row 0) it is logically a burger#3. I'm just reusing the row. I agree this can be weird without an explanation. The other option is simply to freeze the steak# (Whatever that is) and do not allow any new steaks even if the timer is stopped.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

The steakEntry was not being reset properly. Now it sets the defaults so it goes back to the steak and 0 foodTypeCount. However, I see the weirdness on the behavior. If I am in burger#3 but the rest of the timers are not running. It is weird that burger#3 shows up if there are no other burgers on the grill. Would it be best to start with burger#1 if no other burgers on the grill?

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

What I'm saying is that if I originally cooked burger#1 and burger#2, finish with those and stop them. All the grill is in zeros. If I start another burger, is it better for it to be burger#3 or burger #1
I think burger #3 makes sense to me, but don't know about a user who does not know the implementation.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

this is partially why I'm not sure how much extra usable info the user gets from the count.. I think it's a cool feature but there's at least two ways of implementing it and both of them can lead to user confusion.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

Then let's keep it simple and get rid of that counter. We can bring it back in the future if we see that it is useful. For now, the position in the list is very intuitive.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

Go ahead and remove all the item count stuff then from everywhere - we can save a at least 1kb in RAM usage without tracking them which gives us more room to play with.

from barbecueboss.

arquicanedo avatar arquicanedo commented on September 26, 2024

I think we can merge to development. I'll probably mess it up because I suspect there are several conflicts. If you don't mind can you merge when you get the chance? I'll submit a pull request and add you as a reviewer.

from barbecueboss.

nilsbenson avatar nilsbenson commented on September 26, 2024

merged, closing this case

from barbecueboss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.