05-27-2018 13:04
05-27-2018 13:04
I'm a web-developer, and it's taking me quite long to get used to the idiosyncrasies of the FitBit versions of JavaScript, SVG and CSS.
I take it that you developed the engine in-house, presumably for performance reasons. That's perfectly understandable, but some decisions are still puzzling, and I wish I could know the underlying limitations of the system, so I might better understand those decisions and better predict what can or cannot be expected to work (now or in the near future).
For example, here are some differences I ran into just today:
I guess I'm asking:
PS: One way to go would be to make the rendering engine open source. The open source community is a powerful force, and this strategy has propelled some platforms into worldwide popularity. 🙂
06-05-2018 17:08
06-05-2018 17:08
Thanks for the feedback. This is the first version of the SDK and we're steadily improving and adding functionality.
FitBit JS: The online editor seems to accept `async` / `await`, but using them crashes my Versa. Does the JS language follow an EcmaScript standard? If so, which version, or which features?
The device itself supports ES5.1, but the companion isn't as restricted. We are transpiling during the build process, but some things might be beyond the capabilities of the device right now.
FitBit SVG: I can use a `<circle>` element, but I cannot use `stroke` or `style` attributes.
We currently only support the documented attributes on the SVG tags. https://dev.fitbit.com/build/guides/user-interface/svg/#circles
You introduce an element called `<section>`, but it doesn't support a `class` attribute.
It's intended to establish a new coordinate system for child elements. I'll pass on the feedback though.
FitBit CSS: I'm not able to use units like `px`
I can't really comment on the design decision, but it is a very resource constrained platform.
Could we get more comprehensive documentation aimed at experienced web developers?
Do you have anything specific in mind, we're always looking for ways to improve the documentation.
Are there plans to become standards-compliant on the roadmap?
I can't comment on the future, but you can submit feature suggestions here: https://community.fitbit.com/t5/Feature-Suggestions/idb-p/features/label-name/sdk/tab/most-kudoed
06-09-2018 12:37
06-09-2018 12:37
@JonFitbit wrote:Thanks for the feedback. This is the first version of the SDK and we're steadily improving and adding functionality.
Added functionality would be good, but even better would be clarity about the current functionality.
FitBit JS: The online editor seems to accept `async` / `await`, but using them crashes my Versa. Does the JS language follow an EcmaScript standard? If so, which version, or which features?
The device itself supports ES5.1, but the companion isn't as restricted. We are transpiling during the build process, but some things might be beyond the capabilities of the device right now.
My main point there was that there was no way for me to know that `async` / `await` wasn't available on the device until after half an hour of slow debugging. The documentation doesn't tell me, nor does the editor, nor do the build logs.
(In retrospect I can guess what's going on here. You're uniformly transpiling (parts of) ES2017, but you're not providing the necessary runtime to the device. On this specific issue: It would be best to have a separate babel configuration for device files, so we can get early error messages for unsupported features from the editor.)
You introduce an element called `<section>`, but it doesn't support a `class` attribute.
It's intended to establish a new coordinate system for child elements. I'll pass on the feedback though.
This is where standards come in. Why invent this new element if nested `<svg>` already exists? There may be good reasons, but I wish they were more clearly explained.
FitBit CSS: I'm not able to use units like `px`
I can't really comment on the design decision, but it is a very resource constrained platform.
This is one issue that has nothing whatever to do with resource constraints. Using `width: 20px;` is the same as using `width: 20;`, except that the second form is generally discouraged in normal CSS, and the only form supported by FitBit CSS. So web developers trying to develop for FitBit are guaranteed to get this wrong at least once.
Could we get more comprehensive documentation aimed at experienced web developers?
Do you have anything specific in mind, we're always looking for ways to improve the documentation.
Web developers have been able (in more recent years, anyway) to count on all modern javascript engines and APIs to follow a set of web standards, meticulously designed by committees and based on feedback from developers around the world. Using web languages for FitBit development was a stroke of genius, because it leverages the largest group of software developers in the world.
But so far, FitBit does not seem to be taking advantage of this. The documentation and entire ecosystem is clearly targeted only at newcomers. Experienced developers get a rather frustrating experience, locked into your online editor, the SVG and CSS languages not even subsets of their standard counterparts (with non-standard notations that would break on the web). And the documentation is just very incomplete. Ideally it should lay out all differences from the standard in an easily discoverable way. And explain the reasoning behind those differences.
I've already mentioned a number of inconsistencies and other issues, but if you want to know more, I suggest you ask your own developers.
All the best!