Skip to content

Commit 256fb24

Browse files
authored
Merge branch 'develop' into piyush/Fix-search-box-overlay-mobile
2 parents 8d28711 + df50578 commit 256fb24

File tree

19 files changed

+126
-189
lines changed

19 files changed

+126
-189
lines changed

.storybook/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const config = {
44
addons: [
55
'@storybook/addon-links',
66
'@storybook/addon-essentials',
7-
'@storybook/addon-interactions'
7+
'@storybook/addon-interactions',
8+
'@storybook/addon-mdx-gfm'
89
],
910
framework: {
1011
name: '@storybook/react-webpack5',

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,9 @@ Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn mo
2222
If you have found a bug in the p5.js Web Editor, you can file it under the ["issues" tab](https://github.com/processing/p5.js-web-editor/issues). You can also request new features here. A set of templates for reporting issues and requesting features are provided to assist you (and us!). The p5.js Editor is maintained mostly by volunteers, so we thank you for your patience as we try to address your issues as soon as we can. Please post bugs and feature requests in the correct repository if you can:
2323

2424
* p5.js library: [https://github.com/processing/p5.js/issues](https://github.com/processing/p5.js/issues)
25-
* p5.accessibility: [https://github.com/processing/p5.accessibility/issues](https://github.com/processing/p5.accessibility/issues)
26-
* p5.sound: [https://github.com/processing/p5.js-sound/issues](https://github.com/processing/p5.js-sound/issues)
2725
* p5.js website: [https://github.com/processing/p5.js-website/issues](https://github.com/processing/p5.js-website/issues)
2826

2927

30-
### How Do I Know My Issue or Pull Request is Getting Reviewed?
31-
32-
To see which pull requests and issues are currently being reviewed, check the [PR Review Board](https://github.com/processing/p5.js-web-editor/projects/9) or the following Milestones: [MINOR Release](https://github.com/processing/p5.js-web-editor/milestone/8).
33-
34-
3528
## References for Contributing to the p5.js Web Editor
3629

3730
[Code of Conduct](https://editor.p5js.org/code-of-conduct)

client/components/createRedirectWithUsername.jsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

client/index.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta } from '@storybook/addon-docs/blocks';
1+
import { Meta } from '@storybook/blocks';
22

33
<Meta title=" |Intro" />
44

client/modules/IDE/components/Editor/MobileEditor.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const EditorContainer = styled.div`
1919
padding: ${remSize(10)};
2020
font-weight: bold;
2121
${prop('MobilePanel.default')}
22+
background-color: ${prop('backgroundColor')}
2223
}
2324
}
2425

client/modules/IDE/components/Editor/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ class Editor extends React.Component {
582582
</section>
583583
) : (
584584
<EditorContainer expanded={this.props.isExpanded}>
585-
<>
585+
<div>
586586
<IconButton
587587
onClick={this.props.expandSidebar}
588588
icon={FolderIcon}
@@ -591,7 +591,7 @@ class Editor extends React.Component {
591591
{this.props.file.name}
592592
<UnsavedChangesIndicator />
593593
</span>
594-
</>
594+
</div>
595595
<section>
596596
<EditorHolder
597597
ref={(element) => {

client/modules/User/components/LoginForm.jsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,27 @@ function LoginForm() {
5555
<label htmlFor="password" className="form__label">
5656
{t('LoginForm.Password')}
5757
</label>
58-
<button
59-
className="form__eye__icon"
60-
type="button"
61-
onClick={handleVisibility}
62-
>
63-
{showPassword ? (
64-
<AiOutlineEyeInvisible />
65-
) : (
66-
<AiOutlineEye />
67-
)}
68-
</button>
69-
<input
70-
className="form__input"
71-
aria-label={t('LoginForm.PasswordARIA')}
72-
type={showPassword ? 'text' : 'password'}
73-
id="password"
74-
autoComplete="current-password"
75-
{...field.input}
76-
/>
58+
<div className="form__field__password">
59+
<button
60+
className="form__eye__icon"
61+
type="button"
62+
onClick={handleVisibility}
63+
>
64+
{showPassword ? (
65+
<AiOutlineEyeInvisible />
66+
) : (
67+
<AiOutlineEye />
68+
)}
69+
</button>
70+
<input
71+
className="form__input"
72+
aria-label={t('LoginForm.PasswordARIA')}
73+
type={showPassword ? 'text' : 'password'}
74+
id="password"
75+
autoComplete="current-password"
76+
{...field.input}
77+
/>
78+
</div>
7779
{field.meta.touched && field.meta.error && (
7880
<span className="form-error">{field.meta.error}</span>
7981
)}

client/modules/User/components/SignupForm.jsx

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { React, useState } from 'react';
1+
import React, { useState } from 'react';
22
import { useTranslation } from 'react-i18next';
33
import { Form, Field } from 'react-final-form';
44
import { useDispatch } from 'react-redux';
@@ -109,25 +109,27 @@ function SignupForm() {
109109
<label htmlFor="password" className="form__label">
110110
{t('SignupForm.Password')}
111111
</label>
112-
<button
113-
className="form__eye__icon"
114-
type="button"
115-
onClick={handleVisibility}
116-
>
117-
{showPassword ? (
118-
<AiOutlineEyeInvisible />
119-
) : (
120-
<AiOutlineEye />
121-
)}
122-
</button>
123-
<input
124-
className="form__input"
125-
aria-label={t('SignupForm.PasswordARIA')}
126-
type={showPassword ? 'text' : 'password'}
127-
id="password"
128-
autoComplete="new-password"
129-
{...field.input}
130-
/>
112+
<div className="form__field__password">
113+
<button
114+
className="form__eye__icon"
115+
type="button"
116+
onClick={handleVisibility}
117+
>
118+
{showPassword ? (
119+
<AiOutlineEyeInvisible />
120+
) : (
121+
<AiOutlineEye />
122+
)}
123+
</button>
124+
<input
125+
className="form__input"
126+
aria-label={t('SignupForm.PasswordARIA')}
127+
type={showPassword ? 'text' : 'password'}
128+
id="password"
129+
autoComplete="new-password"
130+
{...field.input}
131+
/>
132+
</div>
131133
{field.meta.touched && field.meta.error && (
132134
<span className="form-error">{field.meta.error}</span>
133135
)}
@@ -142,25 +144,27 @@ function SignupForm() {
142144
<label htmlFor="confirmPassword" className="form__label">
143145
{t('SignupForm.ConfirmPassword')}
144146
</label>
145-
<button
146-
className="form__eye__icon"
147-
type="button"
148-
onClick={handleConfirmVisibility}
149-
>
150-
{showConfirmPassword ? (
151-
<AiOutlineEyeInvisible />
152-
) : (
153-
<AiOutlineEye />
154-
)}
155-
</button>
156-
<input
157-
className="form__input"
158-
type={showConfirmPassword ? 'text' : 'password'}
159-
aria-label={t('SignupForm.ConfirmPasswordARIA')}
160-
id="confirmPassword" // Match the id with htmlFor
161-
autoComplete="new-password"
162-
{...field.input}
163-
/>
147+
<div className="form__field__password">
148+
<button
149+
className="form__eye__icon"
150+
type="button"
151+
onClick={handleConfirmVisibility}
152+
>
153+
{showConfirmPassword ? (
154+
<AiOutlineEyeInvisible />
155+
) : (
156+
<AiOutlineEye />
157+
)}
158+
</button>
159+
<input
160+
className="form__input"
161+
type={showConfirmPassword ? 'text' : 'password'}
162+
aria-label={t('SignupForm.ConfirmPasswordARIA')}
163+
id="confirmPassword" // Match the id with htmlFor
164+
autoComplete="new-password"
165+
{...field.input}
166+
/>
167+
</div>
164168
{field.meta.touched && field.meta.error && (
165169
<span className="form-error">{field.meta.error}</span>
166170
)}

client/routes.jsx

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ import NewPasswordView from './modules/User/pages/NewPasswordView';
1717
import AccountView from './modules/User/pages/AccountView';
1818
import CollectionView from './modules/User/pages/CollectionView';
1919
import DashboardView from './modules/User/pages/DashboardView';
20-
import RedirectToUser from './components/createRedirectWithUsername';
2120
import { getUser } from './modules/User/actions';
22-
import {
23-
userIsAuthenticated,
24-
userIsNotAuthenticated,
25-
userIsAuthorized
26-
} from './utils/auth';
2721

2822
/**
2923
* `params` is no longer a top-level route component prop in v4.
@@ -51,25 +45,19 @@ Route.propTypes = {
5145
const routes = (
5246
<Switch>
5347
<Route exact path="/" component={IDEView} />
54-
<Route path="/login" component={userIsNotAuthenticated(LoginView)} />
55-
<Route path="/signup" component={userIsNotAuthenticated(SignupView)} />
48+
<Route path="/login" component={LoginView} />
49+
<Route path="/signup" component={SignupView} />
5650
<Route
5751
path="/reset-password/:reset_password_token"
5852
component={NewPasswordView}
5953
/>
60-
<Route
61-
path="/reset-password"
62-
component={userIsNotAuthenticated(ResetPasswordView)}
63-
/>
54+
<Route path="/reset-password" component={ResetPasswordView} />
6455
<Route path="/verify" component={EmailVerificationView} />
6556
<Route path="/projects/:project_id" component={IDEView} />
6657
<Route path="/:username/full/:project_id" component={FullView} />
6758
<Route path="/full/:project_id" component={FullView} />
6859

69-
<Route
70-
path="/:username/assets"
71-
component={userIsAuthenticated(userIsAuthorized(DashboardView))}
72-
/>
60+
<Route path="/:username/assets" component={DashboardView} />
7361
<Route
7462
path="/:username/sketches/:project_id/add-to-collection"
7563
component={IDEView}
@@ -81,18 +69,10 @@ const routes = (
8169
component={CollectionView}
8270
/>
8371
<Route path="/:username/collections" component={DashboardView} />
84-
85-
<Route
86-
path="/sketches"
87-
component={() => <RedirectToUser url="/:username/sketches" />}
88-
/>
89-
<Route
90-
path="/assets"
91-
component={() => <RedirectToUser url="/:username/assets" />}
92-
/>
93-
<Route path="/account" component={userIsAuthenticated(AccountView)} />
72+
<Route path="/sketches" />
73+
<Route path="/assets" />
74+
<Route path="/account" component={AccountView} />
9475
<Route path="/about" component={IDEView} />
95-
9676
<Route path="/privacy-policy" component={PrivacyPolicy} />
9777
<Route path="/terms-of-use" component={TermsOfUse} />
9878
<Route path="/code-of-conduct" component={CodeOfConduct} />

client/styles/components/_forms.scss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
}
5959

6060
.form__input {
61-
min-width: #{math.div(355, $base-font-size)}rem;
61+
min-width: #{math.div(312, $base-font-size)}rem;
6262
width: 100%;
6363
height: #{math.div(40, $base-font-size)}rem;
6464
font-size: #{math.div(16, $base-font-size)}rem;
@@ -73,12 +73,16 @@
7373
}
7474
}
7575

76+
.form__field__password {
77+
position: relative;
78+
}
79+
7680
.form__eye__icon {
7781
font-size: 28px;
78-
position: relative;
79-
top: 7px;
80-
right: -355px;
81-
margin-left: -40px;
82+
position: absolute;
83+
right: 0px;
84+
top: 4px;
85+
vertical-align: middle;
8286
}
8387

8488

client/utils/auth.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

client/utils/p5-hinter.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)