backstage icon indicating copy to clipboard operation
backstage copied to clipboard

diff's in docs site shouldn't include '+' when copying

Open timja opened this issue 4 years ago • 9 comments

See https://backstage.io/docs/auth/#adding-the-provider-to-the-sign-in-page

+ import { githubAuthApiRef } from '@backstage/core-plugin-api';
+ import { SignInProviderConfig, SignInPage } from '@backstage/core-components';

+ const githubProvider: SignInProviderConfig = {
+  id: 'github-auth-provider',
+  title: 'GitHub',
+  message: 'Sign in using GitHub',
+  apiRef: githubAuthApiRef,
+};

Feature Suggestion

When I copy config from the docs I should not have the '+' in my copy

Possible Implementation

Haven't looked but I've seen other tools have this feature, GitHub does it I believe

Context

Copy paste from docs without annoying me

timja avatar Nov 02 '21 14:11 timja

Totally agree, but might be tricky to fix 😅, kind of at the mercy of Docusaurus here. We're currently on v1 and it's possible that v2 has a fix for this, but ofc it might not too. I'd avoid any big customizations that aren't also compatible with v2 atm though, as we ofc do want to move over at some point.

Rugvip avatar Nov 09 '21 09:11 Rugvip

@Rugvip , in the v1 Docusaurus documentation they link to a set of instructions for adding a copy button to code blocks. But the final comment on the instructions say, "Please upgrade to Docusaurus v2 instead!". So I suspect that upgrading might be the move!

As an aside, I added the copy button from those instructions to the microsite, and it still copied the + of the diffs. 🥴

Edit: migration to Docusaurus v2 can be tracked in issue #8329.

cmpadden avatar Nov 15 '21 18:11 cmpadden

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 05 '22 14:02 github-actions[bot]

not stale

timja avatar Feb 05 '22 14:02 timja

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 06 '22 14:04 github-actions[bot]

not stale

timja avatar Apr 06 '22 15:04 timja

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 05 '22 15:06 github-actions[bot]

Go away

timja avatar Jun 05 '22 16:06 timja

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 04 '22 16:08 github-actions[bot]