Skip to content

Commit

Permalink
fixed formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatimah authored and zzacharo committed Sep 25, 2023
1 parent e70cd0b commit 6ce850a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,15 @@ class ActionDropdown extends Component {

render() {
const { loading, actionSuccess, error } = this.state;
const { options, currentValue, optionsSerializer, disabled, direction, fluid, label } =
this.props;
const {
options,
currentValue,
optionsSerializer,
disabled,
direction,
fluid,
label,
} = this.props;

return (
<Overridable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const MembersSearchBarElement = withState(
icon: "search",
onClick: onBtnSearchClick,
className: "search",
title:i18next.t("Search")
title: i18next.t("Search"),
}}
fluid
placeholder={placeholder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ class RemoveMemberModal extends Component {
closeModal={this.onCloseHandler}
contentMap={this.contentMap}
>
<Modal
open={modalOpen}
role="dialog"
aria-label={i18next.t("Remove user")}
>
<Modal open={modalOpen} role="dialog" aria-label={i18next.t("Remove user")}>
<Modal.Header>{content?.headerText}</Modal.Header>
<Modal.Content>
{content?.bodyText} <br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class InvitationResultItem extends Component {
} = this.state;
const { api: invitationsApi } = this.context;
const rolesCanInviteByType = rolesCanInvite[member.type];
const memberInvitationExpiration = formattedTime(request.expires_at)
const memberInvitationExpiration = formattedTime(request.expires_at);
return (
<Table.Row className="community-member-item">
<Table.Cell>
Expand All @@ -71,7 +71,10 @@ export class InvitationResultItem extends Component {
<Table.Cell data-label={i18next.t("Status")}>
<RequestStatus status={request.status} />
</Table.Cell>
<Table.Cell aria-label={i18next.t("Expires")+ " " +memberInvitationExpiration} data-label={i18next.t("Expires")}>
<Table.Cell
aria-label={i18next.t("Expires") + " " + memberInvitationExpiration}
data-label={i18next.t("Expires")}
>
{memberInvitationExpiration}
</Table.Cell>
<Table.Cell data-label={i18next.t("Role")}>
Expand All @@ -82,7 +85,7 @@ export class InvitationResultItem extends Component {
disabled={!invitation.permissions.can_update_role}
currentValue={invitation.role}
resource={invitation}
label={i18next.t("Role")+ " " +invitation.role}
label={i18next.t("Role") + " " + invitation.role}
/>
</Table.Cell>
<Table.Cell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const InvitationsSearchBarElement = ({
icon: "search",
onClick: onBtnSearchClick,
className: "search",
title:i18next.t("Search")
title: i18next.t("Search"),
}}
fluid
placeholder={i18next.t("Search in invitations...")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class InvitationsMembersModal extends Component {
menu={{
className: "rel-pl-2 rel-pt-2",
tabular: true,
role:"tablist"
role: "tablist",
}}
activeIndex={activeIndex}
panes={this.getPanes()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ export class ManagerMembersResultItem extends Component {
const { config } = this.props;
const { result } = this.state;
const { api } = this.context;
const membershipRelativeTimestamp = timestampToRelativeTime(result.created)
const memberVisibility = result.visible ? i18next.t(config.visibility[0].title) : i18next.t(config.visibility[1].title)

const membershipRelativeTimestamp = timestampToRelativeTime(result.created);
const memberVisibility = result.visible ? i18next.t("Public") : i18next.t("Hidden");
return (
<Table.Row>
<Table.Cell>
Expand Down Expand Up @@ -113,22 +112,29 @@ export class ManagerMembersResultItem extends Component {
</Grid>
</Table.Cell>

<Table.Cell aria-label={i18next.t("Member since")+ " " +membershipRelativeTimestamp} data-label={i18next.t("Member since")}>
<Table.Cell
aria-label={i18next.t("Member since") + " " + membershipRelativeTimestamp}
data-label={i18next.t("Member since")}
>
{membershipRelativeTimestamp}
</Table.Cell>

<Table.Cell aria-label={i18next.t("Visibility")+ " " +memberVisibility} data-label={i18next.t("Visibility")}>
<Table.Cell
aria-label={i18next.t("Visibility") + " " + memberVisibility}
data-label={i18next.t("Visibility")}
>
{result.permissions.can_update_visible ? (
<VisibilityDropdown
visibilityTypes={config.visibility}
successCallback={this.updateMemberVisibility}
action={api.updateVisibility}
currentValue={result.visible}
resource={result}
label={i18next.t("Visibility")+ " " +memberVisibility}
label={i18next.t("Visibility") + " " + memberVisibility}
/>
) : memberVisibility
}
) : (
memberVisibility
)}
</Table.Cell>

<Table.Cell data-label={i18next.t("Role")}>
Expand All @@ -139,7 +145,7 @@ export class ManagerMembersResultItem extends Component {
action={api.updateRole}
currentValue={result.role}
resource={result}
label={i18next.t("Role")+ " " +result.role}
label={i18next.t("Role") + " " + result.role}
/>
) : (
_upperFirst(result.role)
Expand Down

0 comments on commit 6ce850a

Please sign in to comment.