Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Ms app page #290

Merged
merged 18 commits into from
May 27, 2016
Merged

Ms app page #290

merged 18 commits into from
May 27, 2016

Conversation

msecret
Copy link
Contributor

@msecret msecret commented May 20, 2016

Adds an app page with basic information as defined in #220. Uses the app's summary API route for app name, state, last push, buildpack. Uses app's stat API route for current mem/disk vs limit.

Picked the simplest UI possible, by showing this as a horizontal table. This was done to limit having to redo work when we learn more from design.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.599% when pulling 1d2159b8ac2986181d365bbe44882ecdaf644f59 on ms-app_page into d35b788 on staging-alpha.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.599% when pulling 16eff12a26be91001a1cf5e89257cb7cc563052b on ms-app_page into d35b788 on staging-alpha.

@@ -81,7 +81,7 @@ export default class App extends React.Component {
}
}
App.propTypes = {
children: React.PropTypes.element,
children: React.PropTypes.any,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was getting rid of an annoying error because I think we pass different things as children, sometimes an arry of elements, sometimes maybe just an element?

@msecret
Copy link
Contributor Author

msecret commented May 24, 2016

This is what this looks like:

screen shot 2016-05-24 at 4 49 15 pm

@mogul one thing to point out: I'm not using the UI design on the current app page of those little boxes with different information. This is because we'd have to code it anew, we don't have a full screen page like the current deck does anymore and we don't know if it'd be a successful UI as we don't have research behind it.

If you feel that we should layout this page in the same manner as the current deck app page so that our current user's will understand where things are, let us know and we can do that.

this._onChange = this._onChange.bind(this);
}

componentDidMount() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure to clean up any listeners on componentWillUnmount()

@jeremiak
Copy link
Contributor

Hey @msecret this looks pretty great, nice work.

I think it should be merged after #256 and the AppStore internals should be updated to use the new methods like .push() and .merge(). Other than that I think it works well for now while we're doing research on what data users need to see here.

Also way to kick that weird app-URL-has-funky-spaces bug with dedent!

@msecret
Copy link
Contributor Author

msecret commented May 25, 2016

That sounds fine, we can work on getting #256 merged

@mogul
Copy link
Contributor

mogul commented May 25, 2016

I could opine, but I think I'd rather defer to @vz3 and @juliaelman on this...

I'm not using the UI design on the current app page of those little boxes with different information. This is because we'd have to code it anew, we don't have a full screen page like the current deck does anymore and we don't know if it'd be a successful UI as we don't have research behind it.

If you feel that we should layout this page in the same manner as the current deck app page so that our current user's will understand where things are, let us know and we can do that.

Victor and Julia, this is a read-only interim-rewrite of the top of the existing app page, which looks like this...

image

It's happening because we're trying to do the minimum work of reimplementation necessary to move off of the old code base to the new one. Do you think this is acceptable? If not, are there simple changes you'd bless us doing to make the step down acceptable until we have user-research driving the redesign of this page?

@msecret
Copy link
Contributor Author

msecret commented May 25, 2016

@thisisdano take a look at Bret's last comment too.

@juliaelman
Copy link
Contributor

I am going to defer to @thisisdano on this, but think that it might be good for us to start thinking about better styling for tables for cloud.gov overall. It's something we're working on for Compliance Viewer too.

@thisisdano
Copy link
Contributor

thisisdano commented May 26, 2016

That new content section/table is ugly af, but a few fixes would improve it a bunch.

  • Lack of padding in the main content container makes everything worse — 12-16px of padding is a necessary start.
  • "About" subhed feels redundant since there are no other options/tabs.
  • Table itself has too much padding and has unnecessary right/left borders. Leave the borders on the top and bottom of each row, remove the right/left borders on each cell, reduce the padding by 50% on the top/bottom of each cell, and remove the padding from the left of each cell.
  • Memory and Disk Limit are a little difficult to parse as is. They appear to be paired values [n]/[N], but the relationship isn't clear. Is it saying the app is consuming [n] out of [N] total available? Maybe reformat display to read <b>[n]</b> out of [N] ([p]%)
  • Is Disk Limit the same as (what seems to be) Disk usage in the Live section of the earlier screen? Should the title of the row be Disk Usage?
  • Together, those changes would immediately improve the legibility of the content and could be an acceptable interim solution

Marco Segreto and others added 13 commits May 26, 2016 15:06
I had to change the app commitmponent to app page because theres
already a app committedmponet for the mainin committedmonent.
TODO
- shrinkwrap
- any tests
- maybe getting additional data sources for app page
So in the [npm shrinkwrap docs](https://docs.npmjs.com/cli/shrinkwrap),
it says running `npm install` will update the shrinkwrap file, but it
does not. This is probably because we're on an old npm version.
The stats will get added to the main app.

I also added npm-debug.log to git ignore because it pops up sometimes
when something goes wrong with an npm script, and shouldn't be
checked in.
Actually passed a string of elements to app.
The cf api stats app route doesn't give the app guid back, so it
has to be passed back to resv so it's in the data.
I can't think of what to do if the stats are there for an app
that isn't there yet, because the data would be uncomplete, so
just throwing an error.

Just though of a problem: what if the app stats request gets in
before the app summary request? Should probably change how the
requests are done.
Rather then throwing an error when the app for the stats doesn't
exist yet, this creates a new app, to ensure it will still work if
the app stats request comes in before the app summary one.
The cfi api method for app stats returns a weird object with numbers
as keys, so rather then using shared `fetch` method, used custom
ajax method and return the first element in weird object.
Marco and others added 3 commits May 26, 2016 15:08
Formatting the bytes format it comes in as megabytes and showing
both current usage and limit.
This is what we're supposed to do.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.599% when pulling e26b040 on ms-app_page into 23d64a9 on staging-alpha.

Have the app store use the new methods for immutable.
@msecret
Copy link
Contributor Author

msecret commented May 26, 2016

I talked with @thisisdano on slack and we decided that we shouldn't focus on wider design issues here and that a table is fine UI for now.

@msecret msecret mentioned this pull request May 27, 2016
@jeremiak
Copy link
Contributor

Looks good to me, nice work on the code. Merging now for #295 and for my upcoming work in #289

@jeremiak jeremiak merged commit 736e813 into staging-alpha May 27, 2016
@jeremiak jeremiak deleted the ms-app_page branch May 27, 2016 20:35
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.

6 participants