You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/15 12:29:41 UTC
[GitHub] [apisix-website] qier222 opened a new pull request #188: feat: add events page
qier222 opened a new pull request #188:
URL: https://github.com/apache/apisix-website/pull/188
## Changes:
- feat: add events page
- refactor: use docusaurus.config.js to disable dark mode
- refactor: move users showcase data to a single file
- fix: remove buttons.js
- fix: remove users showcase page
## Screenshots of the change:

----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] qier222 commented on a change in pull request #188: feat: add events page & improve the Download page
Posted by GitBox <gi...@apache.org>.
qier222 commented on a change in pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#discussion_r577611866
##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -0,0 +1,286 @@
+import React, { useState, useRef, useEffect } from "react";
+import styled from "styled-components";
+import useOutsideClick from "../../hooks/useOutsideClick";
+import { paramCase } from "change-case";
+
+import IconInfo from "../../assets/icons/info.svg";
+import IconStar from "../../assets/icons/star.svg";
+import IconDocumentText from "../../assets/icons/document-text.svg";
+import IconDownload from "../../assets/icons/download.svg";
+import IconTriangle from "../../assets/icons/triangle.svg";
+import IconSquare from "../../assets/icons/square.svg";
+import IconHexagon from "../../assets/icons/hexagon.svg";
+
+const Dropdown = (props) => {
+ const ref = useRef();
+ const { isDropdownOpen, setIsDropdownOpen } = props;
+ useOutsideClick(ref, () => {
+ if (isDropdownOpen) {
+ setIsDropdownOpen(false);
+ }
+ });
+ return (
+ <StyledDropdown ref={ref} open={isDropdownOpen}>
+ {props.children}
+ </StyledDropdown>
+ );
+};
+
+const ProjectCard = (props) => {
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
+ const {
+ name,
+ description,
+ shape,
+ color,
+ version,
+ releaseDate,
+ githubRepo,
+ } = props;
+ const shapeComponent =
+ shape === "triangle" ? (
+ <IconTriangle />
+ ) : shape === "square" ? (
+ <IconSquare />
+ ) : (
+ <IconHexagon />
+ );
+ const downloadLink = `https://www.apache.org/dyn/closer.cgi/apisix${
+ "/" + paramCase(name.replace("APISIX™", ""))
+ }/${version}/apache-${paramCase(name.replace("™", ""))}-${version}-src`;
+
+ useEffect(() => {
+ getGitHubRepoStats(githubRepo).then((stats) => {
+ setRepoStats({
+ stars: stats.stargazers_count,
+ issues: stats.open_issues_count,
+ });
+ });
+ }, []);
+
+ return (
+ <Card>
+ <LeftSide>
+ <Title>
+ <ShapeBeforeTitle color={color}>{shapeComponent}</ShapeBeforeTitle>
+ {name}
Review comment:
Great idea, link to GitHub repo?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan merged pull request #188: feat: add events page & improve the Download page
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #188:
URL: https://github.com/apache/apisix-website/pull/188
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] qier222 commented on pull request #188: feat: add events page
Posted by GitBox <gi...@apache.org>.
qier222 commented on pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#issuecomment-780357617
Screenshot of the redesigned download page
<img width="1401" alt="CleanShot 2021-02-17 at 15 13 38@2x" src="https://user-images.githubusercontent.com/68148142/108168749-c73e8980-7132-11eb-94a7-d3178d9d2d56.png">
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on pull request #188: feat: add events page
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#issuecomment-779238243
https://stackoverflow.com/questions/6102297/how-do-i-clean-up-my-github-fork-so-i-can-make-clean-pull-requests
Please refer to this issue to clean PR's commits.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #188: feat: add events page & improve the Download page
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#discussion_r577590150
##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -0,0 +1,286 @@
+import React, { useState, useRef, useEffect } from "react";
+import styled from "styled-components";
+import useOutsideClick from "../../hooks/useOutsideClick";
+import { paramCase } from "change-case";
+
+import IconInfo from "../../assets/icons/info.svg";
+import IconStar from "../../assets/icons/star.svg";
+import IconDocumentText from "../../assets/icons/document-text.svg";
+import IconDownload from "../../assets/icons/download.svg";
+import IconTriangle from "../../assets/icons/triangle.svg";
+import IconSquare from "../../assets/icons/square.svg";
+import IconHexagon from "../../assets/icons/hexagon.svg";
+
+const Dropdown = (props) => {
+ const ref = useRef();
+ const { isDropdownOpen, setIsDropdownOpen } = props;
+ useOutsideClick(ref, () => {
+ if (isDropdownOpen) {
+ setIsDropdownOpen(false);
+ }
+ });
+ return (
+ <StyledDropdown ref={ref} open={isDropdownOpen}>
+ {props.children}
+ </StyledDropdown>
+ );
+};
+
+const ProjectCard = (props) => {
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
+ const {
+ name,
+ description,
+ shape,
+ color,
+ version,
+ releaseDate,
+ githubRepo,
+ } = props;
+ const shapeComponent =
+ shape === "triangle" ? (
+ <IconTriangle />
+ ) : shape === "square" ? (
+ <IconSquare />
+ ) : (
+ <IconHexagon />
+ );
+ const downloadLink = `https://www.apache.org/dyn/closer.cgi/apisix${
+ "/" + paramCase(name.replace("APISIX™", ""))
+ }/${version}/apache-${paramCase(name.replace("™", ""))}-${version}-src`;
+
+ useEffect(() => {
+ getGitHubRepoStats(githubRepo).then((stats) => {
+ setRepoStats({
+ stars: stats.stargazers_count,
+ issues: stats.open_issues_count,
+ });
+ });
+ }, []);
+
+ return (
+ <Card>
+ <LeftSide>
+ <Title>
+ <ShapeBeforeTitle color={color}>{shapeComponent}</ShapeBeforeTitle>
+ {name}
+ </Title>
+ <Description>{description}</Description>
+ <LeftSideLinks>
+ <LeftSideLink
+ href={`https://github.com/${githubRepo}`}
+ target="_blank"
+ title="Stars"
+ >
+ <IconStar /> {repoStats.stars}
+ </LeftSideLink>
+ <LeftSideLink
+ href={`https://github.com/${githubRepo}/issues`}
+ target="_blank"
+ title="Issues"
+ >
+ <IconInfo /> {repoStats.issues}
+ </LeftSideLink>
+ <LeftSideLink
+ href={`https://github.com/${githubRepo}/blob/master/CHANGELOG.md`}
+ target="_blank"
+ >
+ <IconDocumentText /> CHANGELOG
+ </LeftSideLink>
+ </LeftSideLinks>
+ </LeftSide>
+ <RightSide>
+ <VersionInfo>
+ Latest Version · <span>{version}</span>
+ <br />
+ Release Date · <span>{releaseDate}</span>
+ </VersionInfo>
+ <div>
+ <Button
+ onClick={() => setIsDropdownOpen(!isDropdownOpen)}
+ background={color}
+ >
+ <IconDownload /> Download
+ </Button>
+ <Dropdown
+ isDropdownOpen={isDropdownOpen}
+ setIsDropdownOpen={setIsDropdownOpen}
+ >
+ <DropdownItem href={`${downloadLink}.tgz`} target="_blank">
+ Source
+ </DropdownItem>
+ <DropdownItem href={`${downloadLink}.tgz.asc`} target="_blank">
+ ASC
Review comment:
Please recheck those links from `https://apisix.apache.org/downloads`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #188: feat: add events page & improve the Download page
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#discussion_r577959411
##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -0,0 +1,286 @@
+import React, { useState, useRef, useEffect } from "react";
+import styled from "styled-components";
+import useOutsideClick from "../../hooks/useOutsideClick";
+import { paramCase } from "change-case";
+
+import IconInfo from "../../assets/icons/info.svg";
+import IconStar from "../../assets/icons/star.svg";
+import IconDocumentText from "../../assets/icons/document-text.svg";
+import IconDownload from "../../assets/icons/download.svg";
+import IconTriangle from "../../assets/icons/triangle.svg";
+import IconSquare from "../../assets/icons/square.svg";
+import IconHexagon from "../../assets/icons/hexagon.svg";
+
+const Dropdown = (props) => {
+ const ref = useRef();
+ const { isDropdownOpen, setIsDropdownOpen } = props;
+ useOutsideClick(ref, () => {
+ if (isDropdownOpen) {
+ setIsDropdownOpen(false);
+ }
+ });
+ return (
+ <StyledDropdown ref={ref} open={isDropdownOpen}>
+ {props.children}
+ </StyledDropdown>
+ );
+};
+
+const ProjectCard = (props) => {
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
+ const {
+ name,
+ description,
+ shape,
+ color,
+ version,
+ releaseDate,
+ githubRepo,
+ } = props;
+ const shapeComponent =
+ shape === "triangle" ? (
+ <IconTriangle />
+ ) : shape === "square" ? (
+ <IconSquare />
+ ) : (
+ <IconHexagon />
+ );
+ const downloadLink = `https://www.apache.org/dyn/closer.cgi/apisix${
+ "/" + paramCase(name.replace("APISIX™", ""))
+ }/${version}/apache-${paramCase(name.replace("™", ""))}-${version}-src`;
+
+ useEffect(() => {
+ getGitHubRepoStats(githubRepo).then((stats) => {
+ setRepoStats({
+ stars: stats.stargazers_count,
+ issues: stats.open_issues_count,
+ });
+ });
+ }, []);
+
+ return (
+ <Card>
+ <LeftSide>
+ <Title>
+ <ShapeBeforeTitle color={color}>{shapeComponent}</ShapeBeforeTitle>
+ {name}
Review comment:
ya
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #188: feat: add events page & improve the Download page
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#discussion_r577591270
##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -0,0 +1,286 @@
+import React, { useState, useRef, useEffect } from "react";
+import styled from "styled-components";
+import useOutsideClick from "../../hooks/useOutsideClick";
+import { paramCase } from "change-case";
+
+import IconInfo from "../../assets/icons/info.svg";
+import IconStar from "../../assets/icons/star.svg";
+import IconDocumentText from "../../assets/icons/document-text.svg";
+import IconDownload from "../../assets/icons/download.svg";
+import IconTriangle from "../../assets/icons/triangle.svg";
+import IconSquare from "../../assets/icons/square.svg";
+import IconHexagon from "../../assets/icons/hexagon.svg";
+
+const Dropdown = (props) => {
+ const ref = useRef();
+ const { isDropdownOpen, setIsDropdownOpen } = props;
+ useOutsideClick(ref, () => {
+ if (isDropdownOpen) {
+ setIsDropdownOpen(false);
+ }
+ });
+ return (
+ <StyledDropdown ref={ref} open={isDropdownOpen}>
+ {props.children}
+ </StyledDropdown>
+ );
+};
+
+const ProjectCard = (props) => {
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
+ const {
+ name,
+ description,
+ shape,
+ color,
+ version,
+ releaseDate,
+ githubRepo,
+ } = props;
+ const shapeComponent =
+ shape === "triangle" ? (
+ <IconTriangle />
+ ) : shape === "square" ? (
+ <IconSquare />
+ ) : (
+ <IconHexagon />
+ );
+ const downloadLink = `https://www.apache.org/dyn/closer.cgi/apisix${
+ "/" + paramCase(name.replace("APISIX™", ""))
+ }/${version}/apache-${paramCase(name.replace("™", ""))}-${version}-src`;
+
+ useEffect(() => {
+ getGitHubRepoStats(githubRepo).then((stats) => {
+ setRepoStats({
+ stars: stats.stargazers_count,
+ issues: stats.open_issues_count,
+ });
+ });
+ }, []);
+
+ return (
+ <Card>
+ <LeftSide>
+ <Title>
+ <ShapeBeforeTitle color={color}>{shapeComponent}</ShapeBeforeTitle>
+ {name}
Review comment:
BTW, not sure if we need to set a hyperlink on the `name` field, so users could visit project's site by clicking name. What's your opinion?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #188: feat: add events page & improve the Download page
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #188:
URL: https://github.com/apache/apisix-website/pull/188#discussion_r577589912
##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -0,0 +1,286 @@
+import React, { useState, useRef, useEffect } from "react";
+import styled from "styled-components";
+import useOutsideClick from "../../hooks/useOutsideClick";
+import { paramCase } from "change-case";
+
+import IconInfo from "../../assets/icons/info.svg";
+import IconStar from "../../assets/icons/star.svg";
+import IconDocumentText from "../../assets/icons/document-text.svg";
+import IconDownload from "../../assets/icons/download.svg";
+import IconTriangle from "../../assets/icons/triangle.svg";
+import IconSquare from "../../assets/icons/square.svg";
+import IconHexagon from "../../assets/icons/hexagon.svg";
+
+const Dropdown = (props) => {
+ const ref = useRef();
+ const { isDropdownOpen, setIsDropdownOpen } = props;
+ useOutsideClick(ref, () => {
+ if (isDropdownOpen) {
+ setIsDropdownOpen(false);
+ }
+ });
+ return (
+ <StyledDropdown ref={ref} open={isDropdownOpen}>
+ {props.children}
+ </StyledDropdown>
+ );
+};
+
+const ProjectCard = (props) => {
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
+ const {
+ name,
+ description,
+ shape,
+ color,
+ version,
+ releaseDate,
+ githubRepo,
+ } = props;
+ const shapeComponent =
+ shape === "triangle" ? (
+ <IconTriangle />
+ ) : shape === "square" ? (
+ <IconSquare />
+ ) : (
+ <IconHexagon />
+ );
+ const downloadLink = `https://www.apache.org/dyn/closer.cgi/apisix${
+ "/" + paramCase(name.replace("APISIX™", ""))
+ }/${version}/apache-${paramCase(name.replace("™", ""))}-${version}-src`;
+
+ useEffect(() => {
+ getGitHubRepoStats(githubRepo).then((stats) => {
+ setRepoStats({
+ stars: stats.stargazers_count,
+ issues: stats.open_issues_count,
+ });
+ });
+ }, []);
+
+ return (
+ <Card>
+ <LeftSide>
+ <Title>
+ <ShapeBeforeTitle color={color}>{shapeComponent}</ShapeBeforeTitle>
+ {name}
+ </Title>
+ <Description>{description}</Description>
+ <LeftSideLinks>
+ <LeftSideLink
+ href={`https://github.com/${githubRepo}`}
+ target="_blank"
+ title="Stars"
+ >
+ <IconStar /> {repoStats.stars}
+ </LeftSideLink>
+ <LeftSideLink
+ href={`https://github.com/${githubRepo}/issues`}
+ target="_blank"
+ title="Issues"
+ >
+ <IconInfo /> {repoStats.issues}
+ </LeftSideLink>
+ <LeftSideLink
+ href={`https://github.com/${githubRepo}/blob/master/CHANGELOG.md`}
+ target="_blank"
+ >
+ <IconDocumentText /> CHANGELOG
+ </LeftSideLink>
+ </LeftSideLinks>
+ </LeftSide>
+ <RightSide>
+ <VersionInfo>
+ Latest Version · <span>{version}</span>
+ <br />
+ Release Date · <span>{releaseDate}</span>
+ </VersionInfo>
+ <div>
+ <Button
+ onClick={() => setIsDropdownOpen(!isDropdownOpen)}
+ background={color}
+ >
+ <IconDownload /> Download
+ </Button>
+ <Dropdown
+ isDropdownOpen={isDropdownOpen}
+ setIsDropdownOpen={setIsDropdownOpen}
+ >
+ <DropdownItem href={`${downloadLink}.tgz`} target="_blank">
+ Source
+ </DropdownItem>
+ <DropdownItem href={`${downloadLink}.tgz.asc`} target="_blank">
+ ASC
Review comment:
Hi @qier222, only the Source link needs a mirror, both ASC and SHA512 should use link like `https://downloads.apache.org/apisix/dashboard/2.4/apache-apisix-dashboard-2.4-src.tgz.asc`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org