internetarchive / internetarchive/openlibrary

Unify `admin_bar.html` and the revert feature of `viewpage.html`

Open
#8,911 11 comments 0 reactions 0 assignees View on GitHub
Affects: Experience Lead: @jimchamp Priority: 3 Type: Feature Request
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

*NOTE*: "revert" is currently being called by Infogami, so that may require special consideration, and make it poorly suited to being a good first or second issue.

### Describe the problem that you'd like solved

We have an "admin bar" with some options in it, then a separate html file with separate styling for the revert button, when we may want to have them together.

### Proposal & Constraints

During today's design call we briefly mentioned extending `admin_bar.html` (and the associated styling for `admin-bar`) by adding the `revert` button to it.

To this end we'd want to:
1. rename `admin_bar.html` and the `admin-bar` CSS class to something like `advanced_options.html` and `advanced-options` in CSS; and
2. ensure proper permissions/scoping for the buttons in this unified view.

Here's how the "revert" button looks on `Author`, pages, `List` pages, and probably anywhere else, aside from `Work` and `Edition` pages, which u sed to look this way, but at some point 'broke':
![image](https://github.com/internetarchive/openlibrary/assets/26524678/ec18da8c-1baf-482e-8ab5-58c9cd1593ea)

Here's how the admin bar looks, while also viewing a page which can be reverted:
![image](https://github.com/internetarchive/openlibrary/assets/26524678/319599be-313e-4dd8-8b31-306b15109ba1)

Based on the call today, we'd want to the `revert` button inside the admin bar, to the right of `View Book on Archive.org` (which we may also want to remove, but that may be a separate discussion).

### Additional context

The complicating factor here is that `viewpage.html` seems to be called by Infogami, so we'd want to be extra sure nothing is breaking from changes to `viewpage.html`, because it's Infogami that is making `viewpage.html` automagically render where it can be used.

### Stakeholders

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.