You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "visortelle (via GitHub)" <gi...@apache.org> on 2023/02/15 18:59:03 UTC

[GitHub] [pulsar-site] visortelle opened a new pull request, #414: Add GitHub Discussions to the discussions section. Refactor related components.

visortelle opened a new pull request, #414:
URL: https://github.com/apache/pulsar-site/pull/414

   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `./preview.sh` at root path) to your PR description, or else your PR might not get merged. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ## Changes
   
   - Refactored discussions component. If you need to add a new "DiscussionPlatform", you can just add a new JS, instead of deal with HTML and Tailwind. https://github.com/tealtools/pulsar-site/blob/5aacd1fddffce24c00ebc0529396f74c5f9529ec/src/pages/community/DiscussionPlatforms.tsx#L8
   - Adjusted styles a bit.
   - Extracted Slider at the community page to a separate component.
   - Removed anchors-related redundant logic at the community page. In Docusaurus anchors work as expected after build.
   - Changed Slack description.
   - Added [.editorconfig](https://editorconfig.org/).
   
   ---
   
   ### Before
   
   ![pulsar apache org_community_](https://user-images.githubusercontent.com/9302460/219126074-24ec9219-a466-4504-8052-88c782e77b3a.png)
   
   ### After
   
   ![localhost_3000_community_](https://user-images.githubusercontent.com/9302460/219126152-b965146a-8223-4178-bd43-94083b03edd8.png)
   
   Ping @tisonkun 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-site] tisonkun commented on a diff in pull request #414: Add GitHub Discussions to the discussions section. Refactor related components.

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #414:
URL: https://github.com/apache/pulsar-site/pull/414#discussion_r1107879685


##########
src/pages/community/DiscussionPlatforms.tsx:
##########
@@ -0,0 +1,195 @@
+import React from "react";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import DiscussionPlatform, {
+  DiscussionPlatformProps,
+} from "./DiscussionPlatform";
+import s from "./DiscussionPlatforms.module.css";
+
+const DiscussionPlatforms: React.FC = () => {
+  const platforms: DiscussionPlatformProps[] = [
+    {
+      name: "User Mailing List",
+      description: (
+        <div>
+          General mailing list for user-related discussions.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "users-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "users-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Developer Mailing List",
+      description: (
+        <div>
+          Questions and discussions related to Pulsar development.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "dev-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "dev-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Discussions at GitHub",
+      description: (
+        <div>
+          A good place to ask any question, bring an idea or get support. Especially if you are not
+          friends with mailing lists.
+        </div>
+      ),
+      actions: [
+        {
+          id: "new-discussion",
+          text: "New discussion",
+          href: "https://github.com/apache/pulsar/discussions/new",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "open",
+          text: "Browse",
+          href: "https://github.com/apache/pulsar/discussions",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/github-mark.svg"),
+    },
+    {
+      name: "Stack Overflow",
+      description: (
+        <span>
+          For technical questions, we ask that you post them to Stack Overflow
+          using the tag{" "}
+          <code style={{ whiteSpace: "nowrap" }}>apache-pulsar</code>.
+        </span>
+      ),
+      actions: [
+        {
+          id: "as",
+          text: "Ask question",
+          href: "https://stackoverflow.com/questions/ask?tags=apache-pulsar",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "browse",
+          text: "Browse",
+          href: "https://stackoverflow.com/questions/tagged/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/stackoverflow-logo.svg"),
+    },
+    {
+      name: "Slack",
+      description: (
+        <>
+          Use it for instant messaging and real-time discussions.
+          <br />
+          <br />
+          Keep in mind that asking questions in Slack makes it harder to find
+          the answers later, due to Slack history isn&apos;t indexable by search
+          engines like Google.
+        </>
+      ),
+      actions: [
+        {
+          id: "open",
+          text: "Open",
+          href: "https://apache-pulsar.slack.com/",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "sign-up",
+          text: "Sign-up",
+          href: "https://communityinviter.com/apps/apache-pulsar/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/Slack_Mark.svg"),
+    },
+    {
+      name: "WeChat",

Review Comment:
   Actually, WeChat Official Account is not a place for discussions but for subscriptions. Can we host this info in a new section? It's a bit out of the scope of this patch but the current layout is not quite in balance (personal bias, though :))



##########
src/pages/community/DiscussionPlatforms.tsx:
##########
@@ -0,0 +1,195 @@
+import React from "react";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import DiscussionPlatform, {
+  DiscussionPlatformProps,
+} from "./DiscussionPlatform";
+import s from "./DiscussionPlatforms.module.css";
+
+const DiscussionPlatforms: React.FC = () => {
+  const platforms: DiscussionPlatformProps[] = [
+    {
+      name: "User Mailing List",
+      description: (
+        <div>
+          General mailing list for user-related discussions.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "users-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "users-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Developer Mailing List",
+      description: (
+        <div>
+          Questions and discussions related to Pulsar development.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "dev-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "dev-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Discussions at GitHub",
+      description: (
+        <div>
+          A good place to ask any question, bring an idea or get support. Especially if you are not
+          friends with mailing lists.
+        </div>
+      ),
+      actions: [
+        {
+          id: "new-discussion",
+          text: "New discussion",
+          href: "https://github.com/apache/pulsar/discussions/new",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "open",
+          text: "Browse",
+          href: "https://github.com/apache/pulsar/discussions",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/github-mark.svg"),
+    },
+    {
+      name: "Stack Overflow",
+      description: (
+        <span>
+          For technical questions, we ask that you post them to Stack Overflow
+          using the tag{" "}
+          <code style={{ whiteSpace: "nowrap" }}>apache-pulsar</code>.
+        </span>
+      ),
+      actions: [
+        {
+          id: "as",
+          text: "Ask question",
+          href: "https://stackoverflow.com/questions/ask?tags=apache-pulsar",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "browse",
+          text: "Browse",
+          href: "https://stackoverflow.com/questions/tagged/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/stackoverflow-logo.svg"),
+    },
+    {
+      name: "Slack",
+      description: (
+        <>
+          Use it for instant messaging and real-time discussions.
+          <br />
+          <br />
+          Keep in mind that asking questions in Slack makes it harder to find
+          the answers later, due to Slack history isn&apos;t indexable by search
+          engines like Google.
+        </>
+      ),
+      actions: [
+        {
+          id: "open",
+          text: "Open",
+          href: "https://apache-pulsar.slack.com/",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "sign-up",
+          text: "Sign-up",
+          href: "https://communityinviter.com/apps/apache-pulsar/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },

Review Comment:
   Perhaps name the buttons as "Sign-up" and "Launch Slack" and switch the order so that align with GitHub Discussions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-site] lhotari commented on a diff in pull request #414: Add GitHub Discussions to the discussions section. Refactor related components.

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on code in PR #414:
URL: https://github.com/apache/pulsar-site/pull/414#discussion_r1108123854


##########
src/pages/community/DiscussionPlatforms.tsx:
##########
@@ -0,0 +1,195 @@
+import React from "react";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import DiscussionPlatform, {
+  DiscussionPlatformProps,
+} from "./DiscussionPlatform";
+import s from "./DiscussionPlatforms.module.css";
+
+const DiscussionPlatforms: React.FC = () => {
+  const platforms: DiscussionPlatformProps[] = [
+    {
+      name: "User Mailing List",
+      description: (
+        <div>
+          General mailing list for user-related discussions.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "users-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "users-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Developer Mailing List",
+      description: (
+        <div>
+          Questions and discussions related to Pulsar development.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "dev-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "dev-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Discussions at GitHub",
+      description: (
+        <div>
+          A good place to ask any question, bring an idea or get support. Especially if you are not
+          friends with mailing lists.
+        </div>
+      ),
+      actions: [
+        {
+          id: "new-discussion",
+          text: "New discussion",
+          href: "https://github.com/apache/pulsar/discussions/new",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "open",
+          text: "Browse",
+          href: "https://github.com/apache/pulsar/discussions",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/github-mark.svg"),
+    },
+    {
+      name: "Stack Overflow",
+      description: (
+        <span>
+          For technical questions, we ask that you post them to Stack Overflow
+          using the tag{" "}
+          <code style={{ whiteSpace: "nowrap" }}>apache-pulsar</code>.
+        </span>
+      ),
+      actions: [
+        {
+          id: "as",
+          text: "Ask question",
+          href: "https://stackoverflow.com/questions/ask?tags=apache-pulsar",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "browse",
+          text: "Browse",
+          href: "https://stackoverflow.com/questions/tagged/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/stackoverflow-logo.svg"),
+    },
+    {
+      name: "Slack",
+      description: (
+        <>
+          Use it for instant messaging and real-time discussions.
+          <br />
+          <br />
+          Keep in mind that asking questions in Slack makes it harder to find
+          the answers later, due to Slack history isn&apos;t indexable by search
+          engines like Google.
+        </>
+      ),
+      actions: [
+        {
+          id: "open",
+          text: "Open",
+          href: "https://apache-pulsar.slack.com/",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "sign-up",
+          text: "Sign-up",
+          href: "https://communityinviter.com/apps/apache-pulsar/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/Slack_Mark.svg"),
+    },
+    {
+      name: "WeChat",

Review Comment:
   Hi @tisonkun, I'll merge this now and perhaps you could handle the further tweaking?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-site] lhotari merged pull request #414: Add GitHub Discussions to the discussions section. Refactor related components.

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #414:
URL: https://github.com/apache/pulsar-site/pull/414


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-site] tisonkun commented on a diff in pull request #414: Add GitHub Discussions to the discussions section. Refactor related components.

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #414:
URL: https://github.com/apache/pulsar-site/pull/414#discussion_r1108211441


##########
src/pages/community/DiscussionPlatforms.tsx:
##########
@@ -0,0 +1,195 @@
+import React from "react";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import DiscussionPlatform, {
+  DiscussionPlatformProps,
+} from "./DiscussionPlatform";
+import s from "./DiscussionPlatforms.module.css";
+
+const DiscussionPlatforms: React.FC = () => {
+  const platforms: DiscussionPlatformProps[] = [
+    {
+      name: "User Mailing List",
+      description: (
+        <div>
+          General mailing list for user-related discussions.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "users-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "users-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Developer Mailing List",
+      description: (
+        <div>
+          Questions and discussions related to Pulsar development.
+          <br />
+          <a
+            href="https://lists.apache.org/list.html?users@pulsar.apache.org"
+            target="_blank"
+          >
+            Access the archives
+          </a>
+        </div>
+      ),
+      actions: [
+        {
+          id: "subscribe",
+          text: "Subscribe",
+          href: "dev-subscribe@pulsar.apache.org",
+          type: "primary",
+        },
+        {
+          id: "unsubscribe",
+          text: "Unsubscribe",
+          href: "dev-unsubscribe@pulsar.apache.org",
+          type: "normal",
+        },
+      ],
+      logoSrc: useBaseUrl("/img/mailing-list.svg"),
+    },
+    {
+      name: "Discussions at GitHub",
+      description: (
+        <div>
+          A good place to ask any question, bring an idea or get support. Especially if you are not
+          friends with mailing lists.
+        </div>
+      ),
+      actions: [
+        {
+          id: "new-discussion",
+          text: "New discussion",
+          href: "https://github.com/apache/pulsar/discussions/new",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "open",
+          text: "Browse",
+          href: "https://github.com/apache/pulsar/discussions",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/github-mark.svg"),
+    },
+    {
+      name: "Stack Overflow",
+      description: (
+        <span>
+          For technical questions, we ask that you post them to Stack Overflow
+          using the tag{" "}
+          <code style={{ whiteSpace: "nowrap" }}>apache-pulsar</code>.
+        </span>
+      ),
+      actions: [
+        {
+          id: "as",
+          text: "Ask question",
+          href: "https://stackoverflow.com/questions/ask?tags=apache-pulsar",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "browse",
+          text: "Browse",
+          href: "https://stackoverflow.com/questions/tagged/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/stackoverflow-logo.svg"),
+    },
+    {
+      name: "Slack",
+      description: (
+        <>
+          Use it for instant messaging and real-time discussions.
+          <br />
+          <br />
+          Keep in mind that asking questions in Slack makes it harder to find
+          the answers later, due to Slack history isn&apos;t indexable by search
+          engines like Google.
+        </>
+      ),
+      actions: [
+        {
+          id: "open",
+          text: "Open",
+          href: "https://apache-pulsar.slack.com/",
+          type: "primary",
+          isExternal: true,
+        },
+        {
+          id: "sign-up",
+          text: "Sign-up",
+          href: "https://communityinviter.com/apps/apache-pulsar/apache-pulsar",
+          type: "normal",
+          isExternal: true,
+        },
+      ],
+      logoSrc: useBaseUrl("/img/Slack_Mark.svg"),
+    },
+    {
+      name: "WeChat",

Review Comment:
   Make sense to postpone this follow-up :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org