Skip to content

Commit

Permalink
[builder-web] Minor UI bug fixes
Browse files Browse the repository at this point in the history
* Clear the search query on navigation, to prevent it from being
  pre-filled when navigating back to the package list from an individual
  package
* Don't show content on the individual package page until loading is
  complete, to prevent a flash of empty dependencies

Signed-off-by: Nathan L Smith <[email protected]>

Pull request: #956
Approved by: adamhjk
  • Loading branch information
Nathan L Smith authored and thesentinels committed Jun 23, 2016
1 parent 2db6dfb commit 3b48d8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions components/builder-web/app/AppComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import {SCMReposPageComponent} from "./scm-repos-page/SCMReposPageComponent";
import {SideNavComponent} from "./side-nav/SideNavComponent";
import {SignInPageComponent} from "./sign-in-page/SignInPageComponent";
import {authenticateWithGitHub, loadSessionState, removeNotification,
requestGitHubAuthToken, routeChange, setGitHubAuthState, signOut,
toggleUserNavMenu} from "./actions/index";
requestGitHubAuthToken, routeChange, setGitHubAuthState,
setPackagesSearchQuery, signOut, toggleUserNavMenu} from "./actions/index";

@Component({
directives: [FooterComponent, HeaderComponent, NotificationsComponent,
Expand Down Expand Up @@ -175,6 +175,8 @@ export class AppComponent implements OnInit {
// Don't show the side nav on the Sign In screen
this.hideNav = value.indexOf("sign-in") !== -1;
store.dispatch(routeChange(value));
// Clear the package search when the route changes
store.dispatch(setPackagesSearchQuery(""));
});

// Listen for changes on the state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {fetchPackage} from "../actions/index";
<hab-spinner [isSpinning]="ui.loading" [onClick]="spinnerFetchPackage">
</hab-spinner>
</div>
<div class="page-body has-sidebar">
<div *ngIf="!ui.loading" class="page-body has-sidebar">
<div class="page-body--main">
<div *ngIf="!ui.exists && !ui.loading">
<p>
Expand Down

0 comments on commit 3b48d8e

Please sign in to comment.