Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
a9873080
Unverified
Commit
a9873080
authored
Nov 11, 2022
by
Samuel Couillard
Committed by
GitHub
Nov 11, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Fix RoomCard placeholder (#4118)
parent
cc860813
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/javascript/components/rooms/RoomCardPlaceHolder.jsx
+23
-0
23 additions, 0 deletions
app/javascript/components/rooms/RoomCardPlaceHolder.jsx
app/javascript/components/rooms/RoomsList.jsx
+3
-3
3 additions, 3 deletions
app/javascript/components/rooms/RoomsList.jsx
with
26 additions
and
3 deletions
app/javascript/components/rooms/RoomPlaceHolder.jsx
→
app/javascript/components/rooms/Room
Card
PlaceHolder.jsx
+
23
−
0
View file @
a9873080
import
React
from
'
react
'
;
import
{
Card
,
Placeholder
}
from
'
react-bootstrap
'
;
export
default
function
RoomPlaceHolder
()
{
export
default
function
Room
Card
PlaceHolder
()
{
return
(
<
Card
className
=
"rooms-placeholder"
style
=
{
{
height
:
'
19rem
'
,
overflow
:
'
hidden
'
}
}
border
=
"light"
>
<
Card
.
Body
style
=
{
{
maxHeight
:
'
12rem
'
,
overflow
:
'
hidden
'
}
}
className
=
"room-placeholder-top pb-0"
>
<
Placeholder
as
=
{
Card
.
Title
}
animation
=
"glow"
>
<
Placeholder
xs
=
{
12
}
size
=
"sm"
/>
<
Card
id
=
"room-card"
border
=
"light"
>
<
Card
.
Body
>
<
Placeholder
as
=
{
Card
.
Title
}
animation
=
"glow"
className
=
"mb-3"
>
<
Placeholder
style
=
{
{
height
:
'
65px
'
,
width
:
'
65px
'
}
}
/>
</
Placeholder
>
<
Placeholder
as
=
{
Card
.
T
ext
}
animation
=
"glow"
>
<
Placeholder
xs
=
{
7
}
size
=
"xs"
/>
<
Placeholder
xs
=
{
4
}
size
=
"xs"
/>
<
Placeholder
xs
=
{
3
}
size
=
"
x
s"
/>
<
Placeholder
as
=
{
Card
.
T
itle
}
animation
=
"glow"
>
<
Placeholder
xs
=
{
5
}
size
=
"s
m
"
/>
</
Placeholder
>
</
Card
.
Body
>
<
Card
.
Body
style
=
{
{
maxHeight
:
'
7rem
'
,
overflow
:
'
hidden
'
}
}
className
=
"pt-0"
>
<
Placeholder
as
=
{
Card
.
Text
}
animation
=
"glow"
>
<
Placeholder
xs
=
{
3
}
size
=
"xs"
/>
<
Placeholder
xs
=
{
2
}
size
=
"xs"
/>
<
Placeholder
xs
=
{
4
}
size
=
"xs"
/>
<
Placeholder
xs
=
{
6
}
size
=
"xs"
/>
<
Placeholder
xs
=
{
2
}
size
=
"xs"
/>
</
Placeholder
>
<
hr
/>
<
Placeholder
.
Button
variant
=
"outline
-secondary
"
className
=
"float-end"
animation
=
"glow"
>
Start
</
Placeholder
.
Button
>
<
Placeholder
.
Button
variant
=
"
brand-
outline"
className
=
"float-end"
animation
=
"glow"
>
Start
</
Placeholder
.
Button
>
</
Card
.
Body
>
</
Card
>
);
...
...
This diff is collapsed.
Click to expand it.
app/javascript/components/rooms/RoomsList.jsx
+
3
−
3
View file @
a9873080
...
...
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
import
RoomCard
from
'
./RoomCard
'
;
import
useRooms
from
'
../../hooks/queries/rooms/useRooms
'
;
import
useCreateRoom
from
'
../../hooks/mutations/rooms/useCreateRoom
'
;
import
RoomPlaceHolder
from
'
./RoomPlaceHolder
'
;
import
Room
Card
PlaceHolder
from
'
./Room
Card
PlaceHolder
'
;
import
Modal
from
'
../shared_components/modals/Modal
'
;
import
CreateRoomForm
from
'
./room/forms/CreateRoomForm
'
;
import
{
useAuth
}
from
'
../../contexts/auth/AuthProvider
'
;
...
...
@@ -34,10 +34,10 @@ export default function RoomsList() {
<
Row
className
=
"g-4 mt-4"
>
{
// eslint-disable-next-line react/no-array-index-key
(
isLoading
&&
[...
Array
(
8
)].
map
((
val
,
idx
)
=>
<
Col
key
=
{
idx
}
className
=
"mt-0 mb-4"
><
RoomPlaceHolder
/></
Col
>))
(
isLoading
&&
[...
Array
(
8
)].
map
((
val
,
idx
)
=>
<
Col
key
=
{
idx
}
className
=
"
col-md-auto
mt-0 mb-4"
><
Room
Card
PlaceHolder
/></
Col
>))
||
rooms
?.
map
((
room
)
=>
(
<
Col
key
=
{
room
.
friendly_id
}
className
=
"col-md-auto mt-0 mb-4"
>
{
(
room
.
optimistic
&&
<
RoomPlaceHolder
/>)
||
<
RoomCard
room
=
{
room
}
/>
}
{
(
room
.
optimistic
&&
<
Room
Card
PlaceHolder
/>)
||
<
RoomCard
room
=
{
room
}
/>
}
</
Col
>
))
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment