Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository page header redesign II: The reredesign #81

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

achilleas-k
Copy link
Member

Following from #78, I've changed the repository header again as we discussed.
Changes:

  • All repository header buttons are smaller now (smaller top and bottom padding) to make the double-row of buttons less obtrusive.
  • The DOI badge had the same shape as the buttons, including button borders, which the DOI button doesn't have.
  • The DOI badge and buttons are at the same height as the repository name. When they are visible, the default repository buttons (Watch, Star, Fork) are moved to a second row.
  • When there are no visible buttons (for non-owners viewing a repository) the default repository buttons are in their original location (though still with smaller padding).
  • The DOI badge is visible in the header on all repository pages for a registered repository.
    • The registered status of a repository used to be calculated in functions that render the repo home view and only when a datacite.yml file existed in the repository root. This functionality is now part of the repository context builder, which makes the information available on all repository pages, but means that we no longer require a datacite.yml file to be in the repository root for an already registered repository. I consider this acceptable, since a repository can be modified after registration and should retain its badge.

Screenshots

Owner view

Registered repository: front page

registered

Registered repository: file view

registered-file-view

Registered repository: wiki page

registered-wiki-page

Unregistered repository: front page

unregistered

Unregistered repository: file view

unregistered-file-view

Ready to register: front page

ready

Ready to register: file view

ready-file-view
NOTE: The buttons change here because without listing the repository's front page, it's unknown whether a datacite.yml file exists in the repository root, which is required for a repository to be ready. I think this is a minor issue and we can address it in the future.

Registered and ready: front page

registered-and-ready

Registered and ready: file view

registered-and-ready-file-view
NOTE: Same issue as above.

Non-owner view

Registered

registered-non-owner

Unregistered

unregistered-non-owner

- Watch, Star, and Fork buttons are smaller.
- DOI related buttons for owners are placed in place of the original
  buttons and the buttons are pushed to the row below.
- The DOI badge for registered repositories is also in place of the
  original buttons, with the original buttons pushed to the row below.
- Simplified new styling rules so no the original repo/header template
  doesn't need any changes, except single line GIN header injection.
- "Request *New* DOI" when it's not the first.  When the repository is
  ready to re-register (it has been registered but also has changes), we
  add the word "New" to the "Request DOI" button to make it clear that
  the button will register the new version of the repository for a new
  DOI.
- Separate button for adding DataCite file (datacite.yml)
Check if a repository is registered when building the repository context
instead of just on the front page root dir listing.
This way, the DOI badge is rendered in the header on all pages of a
repository: Non-root directories, file views, issues, pull requests,
wiki pages, etc.
Old GIN-specific function for rendering notice banners.  Now included in
upstream GOGS.
Copy link
Contributor

@mpsonntag mpsonntag left a comment

Choose a reason for hiding this comment

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

LGTM

@mpsonntag mpsonntag merged commit 6958842 into G-Node:master Jun 3, 2020
@achilleas-k achilleas-k deleted the doi-badge-button-redesign branch June 9, 2020 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants