Skip to content

Commit

Permalink
Remove the view switcher component
Browse files Browse the repository at this point in the history
Remove the (feature-flagged) view switcher component.

We missed the chance to strike while the iron was hot on this one -
neither Dawa or I have time anymore to work on further design
iterations. I don't want to have dead code living behind a feature flag
so I'm removing it. The code will still be in git if we ever want to
revive it. Perhaps these tabs can be re-designed as part of a larger
re-design of the sidebar in the future.

I'll leave the GitHub issue about the usability issues with the existing
selection tabs open: hypothesis/product-backlog#327

For the record the main remaining issues with this were:

1. An undesirable visual popping happens when the view switcher loads on
pages that have a lot of annotations. This also happens with the
existing selection tabs but is arguably more visible with the view
switcher.

2. When there are only two tabs (no orphans) the visual design of the
tabs doesn't make it as immediately obvious which is the currently
selected tab. The other tab may be mistaken for the selected one.

The TODO list was here:

hypothesis/product-backlog#327 (comment)

The pull requests for this view switcher were:

#429
#481
#482
hypothesis/product-backlog#327
  • Loading branch information
seanh committed Jul 31, 2017
1 parent 1950585 commit 9106106
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 258 deletions.
1 change: 0 additions & 1 deletion src/sidebar/app.js
Expand Up @@ -177,7 +177,6 @@ module.exports = angular.module('h', [
.component('threadList', require('./components/thread-list'))
.component('timestamp', require('./components/timestamp'))
.component('topBar', require('./components/top-bar'))
.component('viewSwitcher', require('./components/view-switcher'))

.directive('formInput', require('./directive/form-input'))
.directive('formValidate', require('./directive/form-validate'))
Expand Down
1 change: 0 additions & 1 deletion src/sidebar/components/sidebar-content.js
Expand Up @@ -55,7 +55,6 @@ function SidebarContentController(
totalNotes: counts.notes,
totalAnnotations: counts.annotations,
totalOrphans: counts.orphans,
viewSwitcherEnabled: features.flagEnabled('view-switcher'),
waitingToAnchorAnnotations: counts.anchoring > 0,
});
});
Expand Down
73 changes: 0 additions & 73 deletions src/sidebar/components/test/view-switcher-test.js

This file was deleted.

50 changes: 0 additions & 50 deletions src/sidebar/components/view-switcher.js

This file was deleted.

11 changes: 1 addition & 10 deletions src/sidebar/templates/sidebar-content.html
@@ -1,21 +1,12 @@
<selection-tabs
ng-if="!vm.viewSwitcherEnabled && !vm.search.query() && vm.selectedAnnotationCount() === 0"
ng-if="!vm.search.query() && vm.selectedAnnotationCount() === 0"
is-waiting-to-anchor-annotations="vm.waitingToAnchorAnnotations"
is-loading="vm.isLoading"
selected-tab="vm.selectedTab"
total-annotations="vm.totalAnnotations"
total-notes="vm.totalNotes"
total-orphans="vm.totalOrphans">
</selection-tabs>
<view-switcher
ng-if="vm.viewSwitcherEnabled && !vm.search.query() && vm.selectedAnnotationCount() === 0"
is-waiting-to-anchor-annotations="vm.waitingToAnchorAnnotations"
is-loading="vm.isLoading"
selected-tab="vm.selectedTab"
total-annotations="vm.totalAnnotations"
total-notes="vm.totalNotes"
total-orphans="vm.totalOrphans">
</view-switcher>

<search-status-bar
ng-show="!vm.isLoading()"
Expand Down
57 changes: 0 additions & 57 deletions src/sidebar/templates/view-switcher.html

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/app.scss
Expand Up @@ -31,7 +31,6 @@ $base-line-height: 20px;
@import './thread-list';
@import './tooltip';
@import './top-bar';
@import './view-switcher';

// Top-level styles
// ----------------
Expand Down
65 changes: 0 additions & 65 deletions src/styles/view-switcher.scss

This file was deleted.

0 comments on commit 9106106

Please sign in to comment.