Skip to content

Commit

Permalink
Merge branch 'dev' into cw-2240-inbox-items-avatar-clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
roienatan committed Oct 31, 2023
2 parents 8e58b4b + 3a612a9 commit 73f4930
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const CommonMember: FC<CommonMemberProps> = ({
circlesWithHighestTier[circlesWithHighestTier.length - 1];

governanceCircles.forEach((circle) => {
if (!highestMemberCircle.hierarchy) {
if (!highestMemberCircle?.hierarchy) {
return;
}
if (!circle.hierarchy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ const DiscussionFeedCard = forwardRef<FeedItemRef, DiscussionFeedCardProps>(
}

const circleVisibility = governanceCircles
? getVisibilityString(governanceCircles, discussion?.circleVisibility)
? getVisibilityString(governanceCircles, item?.circleVisibility)
: undefined;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { PredefinedTypes } from "@/shared/models";
import { hasPermission } from "@/shared/utils";
import { FeedItemPinAction, GetAllowedItemsOptions } from "../../FeedItem";

const PINNED_ITEMS_LIMIT = 7;

export function checkIsPinUnpinAllowed(
action: FeedItemPinAction,
options: GetAllowedItemsOptions,
Expand All @@ -17,7 +19,7 @@ export function checkIsPinUnpinAllowed(
}

if (action === FeedItemPinAction.Pin) {
const hasReachedPinLimit = pinnedFeedItems.length >= 3;
const hasReachedPinLimit = pinnedFeedItems.length >= PINNED_ITEMS_LIMIT;

if (isDiscussionPinned || hasReachedPinLimit) {
return false;
Expand Down
15 changes: 11 additions & 4 deletions src/shared/components/Chat/ChatMessage/ChatMessage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@
}
}

.elementDropdownMenu {
direction: ltr;
}

.menuArrowButton {
display: none;
}
.menuArrowButtonVisible {
display: block;
}

.messageTextWithReply {
padding: 0.25rem 0rem 0.5rem;
}
Expand Down Expand Up @@ -220,10 +231,6 @@
}
}

.menuArrowButton {
display: none;
}

.highlighted {
animation: highlighted 10s forwards;
border: 0.06rem solid $c-pink-active-feed-cards;
Expand Down
5 changes: 4 additions & 1 deletion src/shared/components/Chat/ChatMessage/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,10 @@ export default function ChatMessage({
isControlledDropdown={false}
isOpen={isMenuOpen}
styles={{
menuButton: styles.menuArrowButton,
menu: styles.elementDropdownMenu,
menuButton: classNames(styles.menuArrowButton, {
[styles.menuArrowButtonVisible]: isMenuOpen,
}),
}}
feedItemId={feedItemId}
onDelete={onMessageDelete}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/ElementDropdown/ElementDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ const ElementDropdown: FC<ElementDropdownProps> = ({
menuButton: classNames(styles?.menuButton, {
"element-dropdown__menu-button--transparent": transparent,
}),
menu: "element-dropdown__menu",
menu: classNames("element-dropdown__menu", styles?.menu),
menuItem: "element-dropdown__menu-item",
}}
/>
Expand Down

0 comments on commit 73f4930

Please sign in to comment.