Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
6757da21
Commit
6757da21
authored
May 09, 2022
by
Lyza Danger Gardner
Committed by
Lyza Gardner
May 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate `GroupListItem` to tailwind
parent
a1015ade
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
22 deletions
+15
-22
GroupListItem.js
src/sidebar/components/GroupList/GroupListItem.js
+10
-1
GroupListItem-test.js
src/sidebar/components/GroupList/test/GroupListItem-test.js
+5
-2
GroupListItem.scss
src/styles/sidebar/components/GroupListItem.scss
+0
-18
_index.scss
src/styles/sidebar/components/_index.scss
+0
-1
No files found.
src/sidebar/components/GroupList/GroupListItem.js
View file @
6757da21
import
classnames
from
'classnames'
;
import
{
orgName
}
from
'../../helpers/group-list-item-common'
;
import
{
orgName
}
from
'../../helpers/group-list-item-common'
;
import
{
withServices
}
from
'../../service-context'
;
import
{
withServices
}
from
'../../service-context'
;
import
{
useSidebarStore
}
from
'../../store'
;
import
{
useSidebarStore
}
from
'../../store'
;
...
@@ -139,7 +141,14 @@ function GroupListItem({
...
@@ -139,7 +141,14 @@ function GroupListItem({
)}
)}
<
/ul
>
<
/ul
>
{
!
isSelectable
&&
(
{
!
isSelectable
&&
(
<
p
className
=
"GroupListItem__footer"
>
<
p
className
=
{
classnames
(
// Left padding to match submenu items above. Turn off hyphenation
// as it causes this content to hyphenate awkwardly.
'p-2 pl-9 bg-grey-1 hyphens-none'
)}
data
-
testid
=
"unselectable-group-note"
>
This
group
is
restricted
to
specific
URLs
.
This
group
is
restricted
to
specific
URLs
.
<
/p
>
<
/p
>
)}
)}
...
...
src/sidebar/components/GroupList/test/GroupListItem-test.js
View file @
6757da21
...
@@ -301,7 +301,10 @@ describe('GroupListItem', () => {
...
@@ -301,7 +301,10 @@ describe('GroupListItem', () => {
);
);
const
submenu
=
getSubmenu
(
wrapper
);
const
submenu
=
getSubmenu
(
wrapper
);
assert
.
equal
(
submenu
.
exists
(
'.GroupListItem__footer'
),
expectDisabled
);
assert
.
equal
(
submenu
.
exists
(
'[data-testid="unselectable-group-note"]'
),
expectDisabled
);
});
});
});
});
...
@@ -312,7 +315,7 @@ describe('GroupListItem', () => {
...
@@ -312,7 +315,7 @@ describe('GroupListItem', () => {
});
});
assert
.
equal
(
wrapper
.
find
(
'MenuItem'
).
first
().
prop
(
'isDisabled'
),
true
);
assert
.
equal
(
wrapper
.
find
(
'MenuItem'
).
first
().
prop
(
'isDisabled'
),
true
);
const
submenu
=
getSubmenu
(
wrapper
);
const
submenu
=
getSubmenu
(
wrapper
);
assert
.
equal
(
submenu
.
exists
(
'.GroupListItem__footer'
),
true
);
assert
.
isTrue
(
submenu
.
exists
(
'[data-testid="unselectable-group-note"]'
)
);
});
});
[
[
...
...
src/styles/sidebar/components/GroupListItem.scss
deleted
100644 → 0
View file @
a1015ade
@use
'../../variables'
as
var
;
// Footer to display at the bottom of a menu item.
.GroupListItem__footer
{
background-color
:
var
.
$grey-1
;
margin
:
0
;
// TODO consolidate
padding-top
:
15px
;
padding
:
10px
;
// Align the left edge of the footer text with menu item labels above.
padding-left
:
35px
;
white-space
:
normal
;
// Override default hyphenation which is applied to all `p` elements in the
// app.
hyphens
:
none
;
}
src/styles/sidebar/components/_index.scss
View file @
6757da21
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
// ----------
// ----------
@use
'./FilterSelect'
;
@use
'./FilterSelect'
;
@use
'./GroupList'
;
@use
'./GroupList'
;
@use
'./GroupListItem'
;
@use
'./StyledText'
;
@use
'./StyledText'
;
// TODO: Evaluate all classes below after components have been converted to
// TODO: Evaluate all classes below after components have been converted to
...
...
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