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

Improve mobile view #38

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/NDC/CommentView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const CallLibrary = styled.div`
`;

const CommentCard = styled.div`
margin-left: ${isReply ? "2rem" : "0"};
margin-left: ${isReply ? "1rem" : "0"};
display: flex;
padding: 14px 16px;
flex-direction: column;
Expand Down
18 changes: 13 additions & 5 deletions src/NDC/GeneralCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ const Element = styled.div`
const CallLibrary = styled.div`
display: none;
`;

const InnerContainer = styled.div`
max-width: 100%;
`;
//============================================END STYLED COMPONENTS=================================================

//=================================================MORE STYLES======================================================
Expand All @@ -314,12 +318,16 @@ const profileImageStyles = {
overflow: "hidden",
};

const overlayStyle = {
"max-width": "80vw"
}

//===============================================END MORE STYLES====================================================

//=================================================COMPONENTS=======================================================

const inner = (
<div className="d-flex flex-row mx-1">
<InnerContainer className="d-flex flex-row mx-1">
<Widget
src={widgets.views.standardWidgets.newStyledComponents.Element.User}
props={{
Expand All @@ -328,11 +336,11 @@ const inner = (
showHumanBadge: true,
showImage: true,
showSocialName: true,
shortenLength: 20,
shortenLength: 13,
},
}}
/>
</div>
</InnerContainer>
);

const renderTags = () => {
Expand Down Expand Up @@ -431,11 +439,11 @@ return (
}}
/>
)}
<HeaderCard className="d-flex justify-content-between pb-1 border-bottom border-dark">
<HeaderCard className="d-flex flex-wrap justify-content-between pb-1 border-bottom border-dark">
<div className="d-flex align-items-center gap-2">
<Widget
src={widgets.views.standardWidgets.profileOverlayTrigger}
props={{ accountId, children: inner }}
props={{ accountId, children: inner, overlayStyle }}
/>
</div>
<HeaderButtonsContainer>
Expand Down