This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bringing sdc-mental-models branch up to date (#632)
* feat: provide a means of receiving simple feedback from users (#587) * feat: provide a means of receiving simple feedback from users Here, we have swizzled (ejected) the `DocItem/Footer` component from docusaurus, and are inserting our own `ReaderFeedback` component into it before the rest of the doc footer content. Also, the `custom.scss` file has been used to style this element in a consistent manner with the rest of the site. This is the first step to resolve #586: The user interaction can now take place. From here, we will work on integrating the custom events into Google analytics. Ultimately, we will like to implment this feature into the `stellar-docs` repository, as well. Refs: #586 * Moving some React state things around * Including an `alt` tag for the like/dislike buttons * use the `pageId` for `eventLabel` in the send event * style: Linting the code * style: changing inline svg tag to be on newlines, changine filename to `jsx` * feat: Inserting the `DocItem/Footer` components on `dapps` and `api` pages * feat: migrating to the GA4 plugin in docusaurus * Testing with a new ga4 tracking id for preview domain * add some console statements to test what's happening * add configuration for test gtag container for this pr preview * feat: use `gtag` over the deprecated `ga` function * adding my own test gtag? * Remove the `gtag` function call, and just register state * removing the old-style google analytics tag for good * remove staging tag manager containers in preparation for production * replace staging ga4 tracking id with production tracking id * use `@site/static` for feedback button imports, rename file extension * rpc: rename expirationLedgerSeq to liveUntilLedgerSeq (#625) * rpc: rename expirationLedgerSeq to liveUntilLedgerSeq * rpc: rename expiration ledger in openrpc file --------- Co-authored-by: Elliot Voris <[email protected]> * Remove docker image hashes (#628) * remove mentions of specific image hashes in docker commands * update docker image hash to most recent version on releases page * Update WASM retrieval tutorial (#627) * docs: explain the diagnostic events that are emitted in sandbox (#593) * docs: explain the diagnostic events that are emitted in sandbox Perhaps this approach is too verbose? I think having the explanation of what is being seen right there in the tutorial is useful at this early step in the "getting started" section. A new developer is more likely to understand what they see, and remember what it is in the future if we don't try to interrupt their flow at this point by sending them to another page for some (possibly irrelevant) info. I may be incorrect there, and I'm happy to hear opinions from others. Refs: #521 * docs: add a space between two words * editorial in Update hello-world.mdx --------- Co-authored-by: Bri Wylde <[email protected]> * Fix a couple typos in rust-dialect.mdx (#630) --------- Co-authored-by: Elliot Voris <[email protected]> Co-authored-by: Alfonso Acosta <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: Bri Wylde <[email protected]> Co-authored-by: Sapo-Dorado <[email protected]>
- Loading branch information
1 parent
7e80de9
commit 9da60ce
Showing
15 changed files
with
260 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, { useState } from "react"; | ||
import useIsBrowser from '@docusaurus/useIsBrowser'; | ||
|
||
import IconThumbsUp from '@site/static/icons/thumbs-up.svg'; | ||
import IconThumbsDown from '@site/static/icons/thumbs-down.svg'; | ||
|
||
const ReaderFeedback = ({ pageId }) => { | ||
const [feedbackGiven, setFeedbackGiven] = useState(false); | ||
const isBrowser = useIsBrowser(); | ||
if (!isBrowser) { | ||
return null; | ||
} | ||
|
||
const giveFeedback = (value) => { | ||
setFeedbackGiven(true); | ||
}; | ||
|
||
return ( | ||
<div className="readerFeedback"> | ||
{feedbackGiven ? ( | ||
'Thanks for your feedback!' | ||
) : ( | ||
<> | ||
Did you find this page helpful? | ||
<IconThumbsUp | ||
className="feedback_thumbsup" | ||
alt="Like" | ||
onClick={giveFeedback} | ||
/> | ||
<IconThumbsDown | ||
className="feedback_thumbsdown" | ||
alt="Dislike" | ||
onClick={giveFeedback} | ||
/> | ||
</> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default ReaderFeedback; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.