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

[INFRA] Add watermark to drafts #383

Merged
merged 3 commits into from
Dec 16, 2019
Merged

[INFRA] Add watermark to drafts #383

merged 3 commits into from
Dec 16, 2019

Conversation

effigies
Copy link
Collaborator

@effigies effigies commented Dec 13, 2019

Addresses #373.

Created a mkdocs plugin that enables overriding config options on a per-branch basis: https://github.com/effigies/mkdocs-branchcustomization-plugin

Set the plugin to add a stylesheet to every branch but master. I pushed to the main repository and enabled RTD for this branch, so we can see it: https://bids-specification.readthedocs.io/en/enh-watermark/

Things that need doing:

  • ReadTheDocs adds CSS for their version panel that this obliterates. Fix that.
  • Test with tags to make sure that we aren't going to mark all releases as draft.
  • Think about styling.
  • Consider: Do we want two or three cases? We currently have master/other. We could have release/latest/other.

@effigies effigies changed the title [WIP] ENH: Add watermark to drafts ENH: Add watermark to drafts Dec 13, 2019
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

This looks like a very well implemented and easy to maintain solution. Thanks a lot @effigies.

re: style --> I like how it is: It's an obvious marker with the combination of watermark AND colorchange

re: more styles --> I think that one style is enough and that (at least currently) we don't need more styles. In the future, this would boil down to simply adding a CSS file and adjusting a line for your mkdocs plugin, right?

@effigies
Copy link
Collaborator Author

In the future, this would boil down to simply adding a CSS file and adjusting a line for your mkdocs plugin, right?

Yes. Something like:

- branch: /^master$/
  extra_css:
    - style/unreleased.css
- branch: /(?!^master$)/
  extra_css:
    - style/draft.css

Copy link
Member

@KirstieJane KirstieJane left a comment

Choose a reason for hiding this comment

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

I think this looks awesome!

@effigies
Copy link
Collaborator Author

Cool. Thanks for the reviews. I'll go ahead and merge so I can include it in common-derivatives and derivatives,

@effigies effigies merged commit 1d68bf5 into master Dec 16, 2019
@effigies effigies deleted the enh/watermark branch December 16, 2019 14:32
@effigies
Copy link
Collaborator Author

In the future, this would boil down to simply adding a CSS file and adjusting a line for your mkdocs plugin, right?

Actually, I think that what I described above would work on any tag except ones that are on the latest master commit. We'd need to update the plugin to handle tags.

satra added a commit to satra/bids-specification that referenced this pull request Feb 7, 2020
* upstream/master: (439 commits)
  [DOC] Auto-generate changelog entry for PR bids-standard#394
  Update 01-contributors.md
  [DOC] Auto-generate changelog entry for PR bids-standard#389
  [DOC] Auto-generate changelog entry for PR bids-standard#386
  moved list of extension proposals to the main BIDS website section 06-extensions remains, but now points to the main website
  Typo fix for typo fix
  Typo fix for typo fix
  [DOC] Auto-generate changelog entry for PR bids-standard#374
  [FIX] Fix some typos and prose style issues
  [DOC] Auto-generate changelog entry for PR bids-standard#383
  restructure according to @emdupre's proposal
  neurostars for everything not just technical
  Apply suggestions from code review
  MNT: Update Pipfile
  ENH: Append CSS instead of overriding it
  ENH: Add watermark to drafts
  [DOC] Auto-generate changelog entry for PR bids-standard#381
  Update src/06-extensions.md
  Retiring moderator duties for BEP021
  [DOC] Auto-generate changelog entry for PR bids-standard#380
  ...
satra added a commit to satra/bids-specification that referenced this pull request Feb 7, 2020
* upstream/master: (439 commits)
  [DOC] Auto-generate changelog entry for PR bids-standard#394
  Update 01-contributors.md
  [DOC] Auto-generate changelog entry for PR bids-standard#389
  [DOC] Auto-generate changelog entry for PR bids-standard#386
  moved list of extension proposals to the main BIDS website section 06-extensions remains, but now points to the main website
  Typo fix for typo fix
  Typo fix for typo fix
  [DOC] Auto-generate changelog entry for PR bids-standard#374
  [FIX] Fix some typos and prose style issues
  [DOC] Auto-generate changelog entry for PR bids-standard#383
  restructure according to @emdupre's proposal
  neurostars for everything not just technical
  Apply suggestions from code review
  MNT: Update Pipfile
  ENH: Append CSS instead of overriding it
  ENH: Add watermark to drafts
  [DOC] Auto-generate changelog entry for PR bids-standard#381
  Update src/06-extensions.md
  Retiring moderator duties for BEP021
  [DOC] Auto-generate changelog entry for PR bids-standard#380
  ...
@sappelhoff sappelhoff changed the title ENH: Add watermark to drafts [INFRA] Add watermark to drafts Aug 10, 2020
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.

3 participants