Skip to content

Commit f68f62c

Browse files
authored
Merge branch 'develop' into chore/migrate-passport-github
2 parents 64eab11 + 2bc7e59 commit f68f62c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1805
-413
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,51 @@
1-
# p5.js Code of Conduct
1+
## [p5.js community statement](http://p5js.org/community/)
2+
3+
p5.js is a community interested in exploring the creation of art and design with technology.
4+
5+
We are a community of, and in solidarity with, people from every gender identity and expression, sexual orientation, race, ethnicity, language, neuro-type, size, disability, class, religion, culture, subculture, political opinion, age, skill level, occupation, and background. We acknowledge that not everyone has the time, financial means, or capacity to actively participate, but we recognize and encourage involvement of all kinds. We facilitate and foster access and empowerment. We are all learners.
6+
7+
We like these hashtags: #noCodeSnobs (because we value community over efficiency), #newKidLove (because we all started somewhere), #unassumeCore (because we don't assume knowledge), and #BlackLivesMatter (because of course).
8+
9+
In practice:
10+
* We are not code snobs. We do not assume knowledge or imply there are things that somebody should know.
11+
* We insist on actively engaging with requests for feedback regardless of their complexity.
12+
* We welcome newcomers and prioritize the education of others. We strive to approach all tasks with the enthusiasm of a newcomer. Because we believe that newcomers are just as valuable in this effort as experts.
13+
* We consistently make the effort to actively recognize and validate multiple types of contributions.
14+
* We are always willing to offer help or guidance.
15+
16+
In times of conflict:
17+
* We listen.
18+
* We clearly communicate while acknowledging other's feelings.
19+
* We admit when we're wrong, apologize, and accept responsibility for our actions.
20+
* We are continuously seeking to improve ourselves and our community.
21+
* We keep our community respectful and open.
22+
* We make everyone feel heard.
23+
* We are mindful and kind in our interactions.
24+
25+
In the future:
26+
* The future is now.
27+
28+
29+
## p5.js Code of Conduct
230

331
* **Be mindful of your language.** Any of the following behavior is unacceptable:
432
* Offensive comments related to gender identity and expression, sexual orientation, race, ethnicity, language, neuro-type, size, ability, class, religion, culture, subculture, political opinion, age, skill level, occupation, or background
533
* Threats of violence
634
* Deliberate intimidation
7-
* Sexually explicit or violent material
35+
* Sexually explicit or violent material that is not contextualized and preceded by a considerate warning
836
* Unwelcome sexual attention
937
* Stalking or following
1038
* Or any other kinds of harassment
1139

1240
Use your best judgement. If it will possibly make others uncomfortable, do not post it.
1341

14-
* **Be respectful.** Disagreement is not an opportunity to attack someone else's thoughts or opinions. Although views may differ, remember to approach every situation with patience and care.
15-
* **Be considerate.** Think about how your contribution will affect others in the community.
42+
* **Be respectful.** Disagreement is not an opportunity to attack someone else's thoughts or opinions. Although views may differ, remember to approach every situation with patience and care.
43+
* **Be considerate.** Think about how your contribution will affect others in the community.
1644
* **Be open minded.** Embrace new people and new ideas. Our community is continually evolving and we welcome positive change.
1745

1846
If you believe someone is violating the code of conduct, we ask that you report it by emailing [hello@p5js.org](mailto:hello@p5js.org). Please include your name and a description of the incident, and we will get back to you ASAP.
1947

20-
Participants asked to stop any harassing behavior are expected to comply immediately. If a participant engages in harassing behavior, the p5.js Team may take any action they deem appropriate, up to and including expulsion from all p5.js spaces and identification of the participant as a harasser to other p5.js members or the general public.
21-
22-
## Also
48+
Sometimes, participants violating the Code of Conduct are unaware that their behavior is harmful, and an open conversation clears things up to move forward. However, if a participant continues with the behavior, the p5.js team may take any action they deem appropriate, up to and including expulsion from all p5.js spaces and identification of the participant as a harasser to other p5.js members or the general public.
2349

24-
* You can read our [community statement](http://p5js.org/community/) on our website.
50+
---
51+
This statement is licensed under a [Creative Commons license](https://creativecommons.org/licenses/by-sa/4.0/). Please feel free to share and remix with attribution.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
node_modules/
77
npm-debug.log
88
dump.rdb
9-
public/*
109
static/dist/
1110
static/css/app.min.css
1211
dist/

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ENV APP_HOME=/usr/src/app \
44
RUN mkdir -p $APP_HOME
55
WORKDIR $APP_HOME
66
EXPOSE 8000
7+
EXPOSE 8002
78

89
FROM base as development
910
ENV NODE_ENV development
@@ -15,6 +16,7 @@ COPY ./webpack ./webpack
1516
COPY client ./client
1617
COPY server ./server
1718
COPY translations/locales ./translations/locales
19+
COPY public ./public
1820
CMD ["npm", "start"]
1921

2022
FROM development as build

client/common/Button.jsx

Lines changed: 65 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ import { Link } from 'react-router';
66
import { remSize, prop } from '../theme';
77

88
const kinds = {
9+
primary: 'primary',
10+
secondary: 'secondary'
11+
};
12+
13+
const displays = {
914
block: 'block',
10-
icon: 'icon',
1115
inline: 'inline'
1216
};
1317

@@ -16,52 +20,57 @@ const kinds = {
1620
// general global styles
1721
const StyledButton = styled.button`
1822
&&& {
23+
font-weight: bold;
1924
display: flex;
2025
justify-content: center;
2126
align-items: center;
2227
2328
width: max-content;
2429
text-decoration: none;
2530
26-
color: ${prop('Button.default.foreground')};
27-
background-color: ${prop('Button.default.background')};
31+
color: ${({ kind }) => prop(`Button.${kind}.default.foreground`)};
32+
background-color: ${({ kind }) =>
33+
prop(`Button.${kind}.default.background`)};
2834
cursor: pointer;
29-
border: 2px solid ${prop('Button.default.border')};
35+
border: 2px solid ${({ kind }) => prop(`Button.${kind}.default.border`)};
3036
border-radius: 2px;
3137
padding: ${remSize(8)} ${remSize(25)};
3238
line-height: 1;
3339
3440
svg * {
35-
fill: ${prop('Button.default.foreground')};
41+
fill: ${({ kind }) => prop(`Button.${kind}.default.foreground`)};
3642
}
3743
3844
&:hover:not(:disabled) {
39-
color: ${prop('Button.hover.foreground')};
40-
background-color: ${prop('Button.hover.background')};
41-
border-color: ${prop('Button.hover.border')};
45+
color: ${({ kind }) => prop(`Button.${kind}.hover.foreground`)};
46+
background-color: ${({ kind }) =>
47+
prop(`Button.${kind}.hover.background`)};
48+
border-color: ${({ kind }) => prop(`Button.${kind}.hover.border`)};
4249
4350
svg * {
44-
fill: ${prop('Button.hover.foreground')};
51+
fill: ${({ kind }) => prop(`Button.${kind}.hover.foreground`)};
4552
}
4653
}
4754
4855
&:active:not(:disabled) {
49-
color: ${prop('Button.active.foreground')};
50-
background-color: ${prop('Button.active.background')};
56+
color: ${({ kind }) => prop(`Button.${kind}.active.foreground`)};
57+
background-color: ${({ kind }) =>
58+
prop(`Button.${kind}.active.background`)};
5159
5260
svg * {
53-
fill: ${prop('Button.active.foreground')};
61+
fill: ${({ kind }) => prop(`Button.${kind}.active.foreground`)};
5462
}
5563
}
5664
5765
&:disabled {
58-
color: ${prop('Button.disabled.foreground')};
59-
background-color: ${prop('Button.disabled.background')};
60-
border-color: ${prop('Button.disabled.border')};
66+
color: ${({ kind }) => prop(`Button.${kind}.disabled.foreground`)};
67+
background-color: ${({ kind }) =>
68+
prop(`Button.${kind}.disabled.background`)};
69+
border-color: ${({ kind }) => prop(`Button.${kind}.disabled.border`)};
6170
cursor: not-allowed;
6271
6372
svg * {
64-
fill: ${prop('Button.disabled.foreground')};
73+
fill: ${({ kind }) => prop(`Button.${kind}.disabled.foreground`)};
6574
}
6675
}
6776
@@ -108,35 +117,38 @@ const StyledIconButton = styled.button`
108117
height: ${remSize(32)}px;
109118
text-decoration: none;
110119
111-
color: ${prop('Button.default.foreground')};
112-
background-color: ${prop('Button.hover.background')};
120+
color: ${({ kind }) => prop(`Button.${kind}.default.foreground`)};
121+
background-color: ${({ kind }) => prop(`Button.${kind}.hover.background`)};
113122
cursor: pointer;
114123
border: 1px solid transparent;
115124
border-radius: 50%;
116125
padding: ${remSize(8)} ${remSize(25)};
117126
line-height: 1;
118127
119128
&:hover:not(:disabled) {
120-
color: ${prop('Button.hover.foreground')};
121-
background-color: ${prop('Button.hover.background')};
129+
color: ${({ kind }) => prop(`Button.${kind}.hover.foreground`)};
130+
background-color: ${({ kind }) =>
131+
prop(`Button.${kind}.hover.background`)};
122132
123133
svg * {
124-
fill: ${prop('Button.hover.foreground')};
134+
fill: ${({ kind }) => prop(`Button.${kind}.hover.foreground`)};
125135
}
126136
}
127137
128138
&:active:not(:disabled) {
129-
color: ${prop('Button.active.foreground')};
130-
background-color: ${prop('Button.active.background')};
139+
color: ${({ kind }) => prop(`Button.${kind}.active.foreground`)};
140+
background-color: ${({ kind }) =>
141+
prop(`Button.${kind}.active.background`)};
131142
132143
svg * {
133-
fill: ${prop('Button.active.foreground')};
144+
fill: ${({ kind }) => prop(`Button.${kind}.active.foreground`)};
134145
}
135146
}
136147
137148
&:disabled {
138-
color: ${prop('Button.disabled.foreground')};
139-
background-color: ${prop('Button.disabled.background')};
149+
color: ${({ kind }) => prop(`Button.${kind}.disabled.foreground`)};
150+
background-color: ${({ kind }) =>
151+
prop(`Button.${kind}.disabled.background`)};
140152
cursor: not-allowed;
141153
}
142154
@@ -151,10 +163,12 @@ const StyledIconButton = styled.button`
151163
*/
152164
const Button = ({
153165
children,
166+
display,
154167
href,
155168
kind,
156169
iconBefore,
157170
iconAfter,
171+
iconOnly,
158172
'aria-label': ariaLabel,
159173
to,
160174
type,
@@ -170,16 +184,19 @@ const Button = ({
170184
);
171185
let StyledComponent = StyledButton;
172186

173-
if (kind === kinds.inline) {
187+
if (display === displays.inline) {
174188
StyledComponent = StyledInlineButton;
175-
} else if (kind === kinds.icon) {
189+
}
190+
191+
if (iconOnly) {
176192
StyledComponent = StyledIconButton;
177193
}
178194

179195
if (href) {
180196
return (
181197
<StyledComponent
182198
kind={kind}
199+
display={display}
183200
as="a"
184201
aria-label={ariaLabel}
185202
href={href}
@@ -194,6 +211,7 @@ const Button = ({
194211
return (
195212
<StyledComponent
196213
kind={kind}
214+
display={display}
197215
as={Link}
198216
aria-label={ariaLabel}
199217
to={to}
@@ -205,7 +223,13 @@ const Button = ({
205223
}
206224

207225
return (
208-
<StyledComponent kind={kind} aria-label={ariaLabel} type={type} {...props}>
226+
<StyledComponent
227+
kind={kind}
228+
display={display}
229+
aria-label={ariaLabel}
230+
type={type}
231+
{...props}
232+
>
209233
{content}
210234
</StyledComponent>
211235
);
@@ -214,16 +238,19 @@ const Button = ({
214238
Button.defaultProps = {
215239
children: null,
216240
disabled: false,
241+
display: displays.block,
217242
iconAfter: null,
218243
iconBefore: null,
219-
kind: kinds.block,
244+
iconOnly: false,
245+
kind: kinds.primary,
220246
href: null,
221247
'aria-label': null,
222248
to: null,
223249
type: 'button'
224250
};
225251

226252
Button.kinds = kinds;
253+
Button.displays = displays;
227254

228255
Button.propTypes = {
229256
/**
@@ -235,6 +262,10 @@ Button.propTypes = {
235262
If the button can be activated or not
236263
*/
237264
disabled: PropTypes.bool,
265+
/**
266+
* The display type of the button—inline or block
267+
*/
268+
display: PropTypes.string,
238269
/**
239270
* SVG icon to place after child content
240271
*/
@@ -243,6 +274,10 @@ Button.propTypes = {
243274
* SVG icon to place before child content
244275
*/
245276
iconBefore: PropTypes.element,
277+
/**
278+
* If the button content is only an SVG icon
279+
*/
280+
iconOnly: PropTypes.bool,
246281
/**
247282
* The kind of button - determines how it appears visually
248283
*/

client/common/Button.stories.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const ButtonWithIconAfter = () => (
5959
);
6060

6161
export const InlineButtonWithIconAfter = () => (
62-
<Button iconAfter={<DropdownArrowIcon />} kind={Button.kinds.inline}>
62+
<Button iconAfter={<DropdownArrowIcon />} display={Button.displays.inline}>
6363
File name
6464
</Button>
6565
);
@@ -68,6 +68,6 @@ export const InlineIconOnlyButton = () => (
6868
<Button
6969
aria-label="Add to collection"
7070
iconBefore={<PlusIcon />}
71-
kind={Button.kinds.inline}
71+
display={Button.displays.inline}
7272
/>
7373
);

client/components/Dropdown.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ const DropdownWrapper = styled.ul`
3434
}
3535
3636
& li:hover {
37-
background-color: ${prop('Button.hover.background')};
38-
color: ${prop('Button.hover.foreground')};
37+
background-color: ${prop('Button.primary.hover.background')};
38+
color: ${prop('Button.primary.hover.foreground')};
3939
4040
* {
41-
color: ${prop('Button.hover.foreground')};
41+
color: ${prop('Button.primary.hover.foreground')};
4242
}
4343
}
4444

client/components/RootPage.jsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import styled from 'styled-components';
2+
import { prop } from '../theme';
3+
4+
const RootPage = styled.div`
5+
min-height: 100%;
6+
display: flex;
7+
flex-direction: column;
8+
color: ${prop('primaryTextColor')};
9+
background-color: ${prop('backgroundColor')};
10+
height: ${({ fixedHeight }) => fixedHeight || 'initial'};
11+
`;
12+
13+
export default RootPage;

0 commit comments

Comments
 (0)