Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
ae202c7b
Commit
ae202c7b
authored
Jun 18, 2021
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Debug component in studios
parent
fa8aff58
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
40 deletions
+53
-40
src/views/studio/debug.jsx
src/views/studio/debug.jsx
+0
-18
src/views/studio/l10n.json
src/views/studio/l10n.json
+6
-0
src/views/studio/studio-activity.jsx
src/views/studio/studio-activity.jsx
+9
-5
src/views/studio/studio-curators.jsx
src/views/studio/studio-curators.jsx
+9
-5
src/views/studio/studio-managers.jsx
src/views/studio/studio-managers.jsx
+9
-5
src/views/studio/studio-projects.jsx
src/views/studio/studio-projects.jsx
+13
-7
src/views/studio/studio.scss
src/views/studio/studio.scss
+7
-0
No files found.
src/views/studio/debug.jsx
deleted
100644 → 0
View file @
fa8aff58
import
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
const
Debug
=
({
label
,
data
})
=>
(<
div
style=
{
{
padding
:
'
2rem
'
,
border
:
'
1px solid red
'
,
margin
:
'
2rem
'
}
}
>
<
small
>
{
label
}
</
small
>
<
code
>
<
pre
style=
{
{
fontSize
:
'
0.75rem
'
}
}
>
{
JSON
.
stringify
(
data
,
null
,
'
'
)
}
</
pre
>
</
code
>
</
div
>);
Debug
.
propTypes
=
{
label
:
PropTypes
.
string
,
data
:
PropTypes
.
any
// eslint-disable-line react/forbid-prop-types
};
export
default
Debug
;
src/views/studio/l10n.json
View file @
ae202c7b
...
...
@@ -21,6 +21,12 @@
"studio.followErrors.confirmEmail"
:
"Please confirm your email address first"
,
"studio.followErrors.generic"
:
"Something went wrong following the studio"
,
"studio.sectionLoadError.projectsHeadline"
:
"Something went wrong loading projects"
,
"studio.sectionLoadError.curatorsHeadline"
:
"Something went wrong loading curators"
,
"studio.sectionLoadError.managersHeadline"
:
"Something went wrong loading managers"
,
"studio.sectionLoadError.activityHeadline"
:
"Something went wrong loading managers"
,
"studio.sectionLoadError.tryAgain"
:
"Try again"
,
"studio.projectsHeader"
:
"Projects"
,
"studio.addProjectsHeader"
:
"Add Projects"
,
"studio.addProject"
:
"Add"
,
...
...
src/views/studio/studio-activity.jsx
View file @
ae202c7b
...
...
@@ -6,7 +6,6 @@ import {connect} from 'react-redux';
import
{
activity
}
from
'
./lib/redux-modules
'
;
import
{
loadActivity
}
from
'
./lib/studio-activity-actions
'
;
import
Debug
from
'
./debug.jsx
'
;
import
classNames
from
'
classnames
'
;
import
SocialMessage
from
'
../../components/social-message/social-message.jsx
'
;
...
...
@@ -181,10 +180,15 @@ const StudioActivity = ({items, loading, error, moreToLoad, onLoadMore}) => {
<
h2
><
FormattedMessage
id=
"studio.activityHeader"
/></
h2
>
</
div
>
{
loading
&&
<
div
>
Loading...
</
div
>
}
{
error
&&
<
Debug
label=
"Error"
data=
{
error
}
/>
}
{
error
&&
<
div
className=
"studio-section-load-error studio-info-box studio-info-box-error"
>
<
h3
><
FormattedMessage
id=
"studio.sectionLoadError.activityHeadline"
/></
h3
>
<
button
className=
"button"
onClick=
{
onLoadMore
}
>
<
FormattedMessage
id=
"studio.sectionLoadError.tryAgain"
/>
</
button
>
</
div
>
}
<
ul
className=
"studio-messages-list"
>
...
...
src/views/studio/studio-curators.jsx
View file @
ae202c7b
...
...
@@ -5,7 +5,6 @@ import {FormattedMessage} from 'react-intl';
import
classNames
from
'
classnames
'
;
import
{
curators
}
from
'
./lib/redux-modules
'
;
import
Debug
from
'
./debug.jsx
'
;
import
{
CuratorTile
}
from
'
./studio-member-tile.jsx
'
;
import
CuratorInviter
from
'
./studio-curator-inviter.jsx
'
;
import
{
loadCurators
}
from
'
./lib/studio-member-actions
'
;
...
...
@@ -28,10 +27,15 @@ const StudioCurators = ({
<
h2
><
FormattedMessage
id=
"studio.curatorsHeader"
/></
h2
>
</
div
>
{
canInviteCurators
&&
<
CuratorInviter
/>
}
{
error
&&
<
Debug
label=
"Error"
data=
{
error
}
/>
}
{
error
&&
<
div
className=
"studio-section-load-error studio-info-box studio-info-box-error"
>
<
h3
><
FormattedMessage
id=
"studio.sectionLoadError.curatorsHeadline"
/></
h3
>
<
button
className=
"button"
onClick=
{
onLoadMore
}
>
<
FormattedMessage
id=
"studio.sectionLoadError.tryAgain"
/>
</
button
>
</
div
>
}
<
div
className=
"studio-members-grid"
>
{
items
.
length
===
0
&&
!
loading
?
(
<
div
className=
"studio-empty"
>
...
...
src/views/studio/studio-managers.jsx
View file @
ae202c7b
...
...
@@ -12,7 +12,6 @@ import {
selectStudioHasReachedManagerThreshold
}
from
'
../../redux/studio.js
'
;
import
{
loadManagers
}
from
'
./lib/studio-member-actions
'
;
import
Debug
from
'
./debug.jsx
'
;
import
{
ManagerTile
}
from
'
./studio-member-tile.jsx
'
;
import
StudioInfoBox
from
'
./studio-info-box.jsx
'
;
import
AlertProvider
from
'
../../components/alert/alert-provider.jsx
'
;
...
...
@@ -85,10 +84,15 @@ const StudioManagers = ({
</
div
>
}
</
div
>
{
error
&&
<
Debug
label=
"Error"
data=
{
error
}
/>
}
{
error
&&
<
div
className=
"studio-section-load-error studio-info-box studio-info-box-error"
>
<
h3
><
FormattedMessage
id=
"studio.sectionLoadError.managersHeadline"
/></
h3
>
<
button
className=
"button"
onClick=
{
onLoadMore
}
>
<
FormattedMessage
id=
"studio.sectionLoadError.tryAgain"
/>
</
button
>
</
div
>
}
<
div
className=
"studio-members-grid"
>
{
items
.
map
(
item
=>
(<
ManagerTile
...
...
src/views/studio/studio-projects.jsx
View file @
ae202c7b
...
...
@@ -7,7 +7,6 @@ import classNames from 'classnames';
import
{
projects
}
from
'
./lib/redux-modules
'
;
import
{
selectCanAddProjects
,
selectCanEditOpenToAll
,
selectShowProjectMuteError
}
from
'
../../redux/studio-permissions
'
;
import
Debug
from
'
./debug.jsx
'
;
import
StudioProjectAdder
from
'
./studio-project-adder.jsx
'
;
import
StudioProjectTile
from
'
./studio-project-tile.jsx
'
;
import
{
loadProjects
}
from
'
./lib/studio-project-actions.js
'
;
...
...
@@ -49,12 +48,19 @@ const StudioProjects = ({
</
CommentingStatus
>
}
{
canAddProjects
&&
<
StudioProjectAdder
/>
}
{
error
&&
<
Debug
label=
"Error"
data=
{
error
}
/>
}
{
error
&&
<
div
className=
"studio-section-load-error studio-info-box studio-info-box-error"
>
<
h3
><
FormattedMessage
id=
"studio.sectionLoadError.projectsHeadline"
/></
h3
>
<
button
className=
"button"
onClick=
{
onLoadMore
}
>
<
FormattedMessage
id=
"studio.sectionLoadError.tryAgain"
/>
</
button
>
</
div
>
}
<
div
className=
"studio-projects-grid"
>
{
items
.
length
===
0
&&
!
loading
?
(
{
items
.
length
===
0
&&
!
loading
&&
!
error
?
(
<
div
className=
"studio-empty"
>
{
canAddProjects
?
(
<
React
.
Fragment
>
...
...
src/views/studio/studio.scss
View file @
ae202c7b
...
...
@@ -174,6 +174,13 @@ $radius: 8px;
}
}
.studio-section-load-error
{
margin-top
:
2rem
;
padding
:
1rem
;
flex-direction
:
column
;
text-align
:
center
;
}
.studio-tab-nav
{
border-bottom
:
1px
solid
$active-dark-gray
;
padding-bottom
:
8px
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment