Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community modals: align modal layouts #2339

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class PendingCommunitiesModal extends Component {
onOpen={handleOnOpen}
>
<Modal.Header>
<Header as="h2" id="record-communities-header">
<Header as="h2" size="small" id="record-communities-header" className="mt-5">
{i18next.t("Pending communities")}
</Header>
</Modal.Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class PendingCommunitiesSearch extends Component {
/>
</Modal.Content>

<Modal.Content scrolling>
<Modal.Content scrolling className="community-list-results">
<ResultsLoader>
<EmptyResults />
<Error />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class RecordCommunitiesList extends Component {
?.slice(0, maxDisplayedCommunities)
.map((community) => (
<Item key={community.id}>
<Image size="mini" src={community.links.logo} alt="" />
<Image wrapped size="mini" src={community.links.logo} alt="" />
<Item.Content verticalAlign="middle">
<Item.Header as={Header}>
<Header as="a" href={community.links.self_html} size="small">
Expand All @@ -61,7 +61,7 @@ export class RecordCommunitiesList extends Component {

Element = (
<>
<Item.Group>{communityItems}</Item.Group>
<Item.Group unstackable>{communityItems}</Item.Group>
{error && <Message error>{error}</Message>}
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class RecordCommunitiesListModal extends Component {
trigger={trigger}
>
<Modal.Header>
<Header as="h2" id="record-communities-header">
<Header as="h2" size="small" id="record-communities-header" className="mt-5">
{i18next.t("Communities")}
</Header>
</Modal.Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class RecordCommunitiesSearch extends Component {
/>
</Modal.Content>

<Modal.Content scrolling>
<Modal.Content scrolling className="community-list-results">
<ResultsLoader>
<EmptyResults />
<Error />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,21 @@

}

.ui.items{
.ui.items {

&.unstackable > .item > .image {
&.mini {
width: @miniWidth !important;
min-width: @miniWidth !important;

img {
max-height: @miniWidth;
min-width: @miniWidth;
object-fit: contain;
}
}
}

.ui.image.community-logo {
img {
height: @communityItemLogoWidth !important; // needs to override height set for images in items by SUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@
.community-list-results.content {
height: calc(55vh - 10em);

.item {
padding: @defaultPadding;
.community-item {
padding: @defaultPadding calc(@defaultPadding/2);
border-bottom: 1px solid @borderColor;

&:first-child {
&:first-child,
&:first-child + .mobile {
padding-top: @defaultPadding !important; //overriding semantic ui's !important
border-top: 1px solid @borderColor;
}

&:last-child {
padding-bottom: @defaultPadding !important; //overriding semantic ui's !important
}

@media all and (max-width: @largestMobileScreen) {
padding: @defaultPadding calc(@defaultPadding/4);
}

&.selected {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,32 +100,6 @@
}

.item {
&.community-item {
.ui.grid {
margin-left: 0.5em !important;
width: 100% !important;
}

.content {
width: 100% !important;

&.flex.right-column{
flex-direction: column;
align-items: end;
};
}

.header {
word-break: break-word;
margin-bottom: 0;

.header-link {
@media all and (max-width: @largestMobileScreen) {
margin-top: 1rem;
}
}
}
}

&.flex {
display: flex !important;
Expand Down
Loading