Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

Ui update#3

Open
Bill-P wants to merge 3 commits into
Google-Health-API:masterfrom
Bill-P:UI_update
Open

Ui update#3
Bill-P wants to merge 3 commits into
Google-Health-API:masterfrom
Bill-P:UI_update

Conversation

@Bill-P

@Bill-P Bill-P commented Jan 1, 2018

Copy link
Copy Markdown

Adds Labels to UI and Truncates the Pressure Altitude to 2 decimal points

@orviwan orviwan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Bill, some minor nits.

Comment thread package.json
@@ -1,7 +1,15 @@
{
"fitbit": {
"appUUID": "0cb04f31-513b-4afe-9bea-3c6eb955f583",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't include appUUID in the example.

Comment thread manifest.json
@@ -0,0 +1 @@
{"appManifestVersion":1,"main":"app/index.js","svgMain":"resources/index.gui","svgWidgets":"resources/widgets.gui","appType":"app","i18n":{"en":{"name":"Altimeter"}},"buildId":"0x0ab90f121979b2ad","uuid":"0cb04f31-513b-4afe-9bea-3c6eb955f583","name":"Altimeter","bundleDate":"2018-01-01T17:01:16.275Z","requestedPermissions":[],"wipeColor":"#03a9f4"} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need the manifest file.

Comment thread app/index.js
bar.onreading = function() {
altitudeLabel.innerText = altitudeFromPressure(bar.pressure / 100) + " ft";
pressureLabel.innerText = Math.round(bar.pressure / 100) + " hPa";
altitudeLabel.text = Math.round(altitudeFromPressure(bar.pressure / 100)*100)/100 + " ft";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs simplifying a bit.

Comment thread resources/index.gui
<svg>
<text id="altitude" x="50%" y="180" class="large-value">altitude</text>
<text id="pressure" x="50%" y="230" class="small-value">pressure</text>
<text id="altitude-Label" x="50%" y="50" class="label">Pressure altitude</text>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase "label" for consistency

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants