From 268932082126e53ef4d29e84c08d1b3cd2d992d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Maillot?= Date: Tue, 13 Aug 2024 10:08:16 +0200 Subject: [PATCH] Fixing doc synthax highlighting + typo HoverReactionsBar --- .../docs/controls/HoverReactionsBar.md | 14 +++++------ .../documentation/docs/guides/contributing.md | 23 +++++++++-------- .../docs/guides/submitting-pr.md | 25 ++++++++++--------- 3 files changed, 32 insertions(+), 30 deletions(-) diff --git a/docs/documentation/docs/controls/HoverReactionsBar.md b/docs/documentation/docs/controls/HoverReactionsBar.md index 35ee2752b..75298afa4 100644 --- a/docs/documentation/docs/controls/HoverReactionsBar.md +++ b/docs/documentation/docs/controls/HoverReactionsBar.md @@ -37,19 +37,19 @@ import { HoverReactionsBar } from '@pnp/spfx-controls-react/lib/HoverReactionsBa - With the `onSelect` property you can get the selected emoji: ```typescript - const onSelectEmoji = React.useCallback(async (emoji: string, emojiInfo: IEmojiInfo) => { - console.log('emoji', emoji); - console.log('emojiInfo object',emojiInfo); - setIsOpenHoverReactionBar(false); - }, []); +const onSelectEmoji = React.useCallback(async (emoji: string, emojiInfo: IEmojiInfo) => { + console.log('emoji', emoji); + console.log('emojiInfo object',emojiInfo); + setIsOpenHoverReactionBar(false); +}, []); -``` onSelect: (emoji: string | undefined, emojiInfo?: IEmojiInfo) => void; isOpen: boolean; onDismiss: () => void; top4Reactions?: string[]; target: HTMLDivElement; themeV8?: Theme ; +``` ## Implementation @@ -57,7 +57,7 @@ The HoverReactionsBar control can be configured with the following properties: | Property | Type | Required | Description | | ---- | ---- | ---- | ---- | -| isOpen | boolean | yes | show hoverReactionsVar | +| isOpen | boolean | yes | show hoverReactionsBar | | onSelected |onSelect: (emoji: string, emojiInfo?: IEmojiInfo) => void;| yes | selected Emoji | | top4Reactions | string[] | no | name of emojis to show on the bar | | target | HTMLDivElement | yes | container of controls who fire the HoverReactionsBar | diff --git a/docs/documentation/docs/guides/contributing.md b/docs/documentation/docs/guides/contributing.md index 3caa904d0..e414a0c13 100644 --- a/docs/documentation/docs/guides/contributing.md +++ b/docs/documentation/docs/guides/contributing.md @@ -27,22 +27,23 @@ Typos are embarrassing! Most PR's that fix typos will be accepted immediately. I Before contributing: - ensure that the **dev** branch on your fork is in sync with the original **sp-dev-fx-controls-react** repository - ```bash - # assuming you are in the folder of your locally cloned fork.... - git checkout dev - # assuming you have a remote named `upstream` pointing to the official **sp-dev-fx-controls-react** repo - git fetch upstream +```bash +# assuming you are in the folder of your locally cloned fork.... +git checkout dev - # update your local dev to be a mirror of what's in the main repo - git pull --rebase upstream dev - ``` +# assuming you have a remote named `upstream` pointing to the official **sp-dev-fx-controls-react** repo +git fetch upstream + +# update your local dev to be a mirror of what's in the main repo +git pull --rebase upstream dev +``` - create a feature branch for your change. If you'll get stuck on an issue or merging your PR will take a while, this will allow you to have a clean dev branch that you can use for contributing other changes - ```bash - git checkout -b my-contribution - ``` +```bash +git checkout -b my-contribution +``` ## DO's & DON'Ts diff --git a/docs/documentation/docs/guides/submitting-pr.md b/docs/documentation/docs/guides/submitting-pr.md index 403789035..ea9756947 100644 --- a/docs/documentation/docs/guides/submitting-pr.md +++ b/docs/documentation/docs/guides/submitting-pr.md @@ -7,22 +7,23 @@ We appreciate your initiative and would love to integrate your work with the res - [AC: Keep Your Forked Git Repo Updated with Changes from the Original Upstream Repo](http://www.andrewconnell.com/blog/keep-your-forked-git-repo-updated-with-changes-from-the-original-upstream-repo) - Looking for a quick cheat sheet? Look no further: - ```bash - # assuming you are in the folder of your locally cloned fork.... - git checkout dev +```bash +# assuming you are in the folder of your locally cloned fork.... +git checkout dev - # assuming you have a remote named `upstream` pointing to the official **sp-dev-fx-controls-react** repo - git fetch upstream +# assuming you have a remote named `upstream` pointing to the official **sp-dev-fx-controls-react** repo +git fetch upstream - # update your local dev branch to be a mirror of what's in the main repo - git pull --rebase upstream dev +# update your local dev branch to be a mirror of what's in the main repo +git pull --rebase upstream dev - # switch to your branch where you are working, say "issue-xyz" - git checkout issue-xyz +# switch to your branch where you are working, say "issue-xyz" +git checkout issue-xyz + +# update your branch to update its fork point to the current tip of dev & put your changes on top of it +git rebase dev +``` - # update your branch to update its fork point to the current tip of dev & put your changes on top of it - git rebase dev - ``` - submit PR to the **dev** branch of the main repo. PRs submitted to other branches will be declined - let us know what's in the PR: is it a new command, bug fix or a minor update in the docs? The clearer the information you provide, the quicker your PR can be verified and merged - ideally 1 PR = 1 commit - this makes it easier to keep the log clear for everyone and track what's changed. If you're new to working with git, we'll squash your commits for you when merging your changes into the main repo