Skip to content

Guest user @-mentions and styling fix for ListItemComments #1990

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change styling for comments control
  • Loading branch information
patrikhellgren committed May 5, 2025
commit 0b106818742e3a61dffd9772362068af3948e296
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ export const AddComment: React.FunctionComponent<IAddCommentProps> = (props: IAd
<>
<Stack tokens={{ padding: 5 }} styles={{ root: { width: 260 } }}>
<Stack horizontal horizontalAlign="start" tokens={{ childrenGap: 10 }}>
<img src={`${PHOTO_URL}${_user.mail}`} width={30} height={30} style={{ borderRadius: "50%" }} />
<Stack>
<img src={`${PHOTO_URL}${_user.mail}`} width={30} height={30} style={{ borderRadius: "50%" }} alt={_user.displayName} />
<Stack styles={{ root: { overflow: "hidden" } }}>
<Text styles={{ root: { fontWeight: 700 } }} variant="smallPlus" nowrap>
{_user.displayName}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ export const useAddCommentStyles = () => { // eslint-disable-line @typescript-es
borderWidth: 1,
borderStyle: "solid",
borderColor: "silver",
width: 322,
width: "100%",
boxSizing: "border-box",
":focus": {
borderColor: theme.themePrimary,
},
":hover": {
borderColor: theme.themePrimary,
boxSizing: "border-box",
},
},
};
Expand All @@ -38,10 +40,12 @@ export const useAddCommentStyles = () => { // eslint-disable-line @typescript-es
marginTop: 2,
backgroundColor: theme?.white,
boxShadow: "0 5px 15px rgba(50, 50, 90, .1)",
boxSizing: "border-box",
":hover": {
borderColor: theme.themePrimary,
backgroundColor: theme.neutralLighterAlt,
borderWidth: 1,
boxSizing: "border-box",
} as IStyle,
} as IStyle,
};
Expand All @@ -53,14 +57,21 @@ export const useAddCommentStyles = () => { // eslint-disable-line @typescript-es
display: "block",
borderColor: "silver",
overflow: "hidden",
width: 320,
":focus": {
width: "100%",
boxSizing: "border-box",
paddingTop: 1,
paddingLeft: 1,
":focus": {
borderWidth: 2,
borderColor: theme.themePrimary,
paddingTop: 0,
paddingLeft: 0,
},
":hover": {
borderWidth: 2,
borderColor: theme.themePrimary,
paddingTop: 0,
paddingLeft: 0,
},
} as IStyle,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ export const CommentsList: React.FunctionComponent = () => {

return (
<>
<Stack tokens={{ childrenGap: 10, maxWidth: 335 }}>
<Stack tokens={{ childrenGap: 10 }}>
<RenderError errorInfo={errorInfo} />
<AddComment />
<Text variant="small" block style={{ fontWeight: 600 }}>
{strings.ListItemCommentsLabel}
</Text>
<div className={configurationListClasses.titlesContainer} onScroll={handleScroll} ref={scrollPanelRef}>
<Stack>
<Stack styles={{ root: { width: '100%' }}}>
<RenderComments />
</Stack>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ export const useListItemCommentsStyles = (): returnObjectStyles => {
};
const documentCardStyles: Partial<IDocumentCardStyles> = {
root: {
maxWidth: "initial",
marginBottom: 7,
width: 322,
width: "100%",
backgroundColor: theme.neutralLighterAlt,
userSelect: "text",
boxSizing: "border-box",
":hover": {
borderColor: theme.themePrimary,
borderWidth: 1,
Expand All @@ -62,11 +64,13 @@ export const useListItemCommentsStyles = (): returnObjectStyles => {

const documentCardHighlightedStyles: Partial<IDocumentCardStyles> = {
root: {
maxWidth: "initial",
marginBottom: 7,
width: 322,
width: "100%",
backgroundColor: theme.themeLighter,
userSelect: "text",
border: "solid 3px "+theme.themePrimary,
boxSizing: "border-box",
":hover": {
borderColor: theme.themePrimary,
borderWidth: 1,
Expand All @@ -78,6 +82,7 @@ export const useListItemCommentsStyles = (): returnObjectStyles => {
root: {
marginBottom: 5,
backgroundColor: theme.neutralLighterAlt,
boxSizing: "border-box",
":hover": {
borderColor: theme.themePrimary,
borderWidth: 1,
Expand All @@ -90,6 +95,7 @@ export const useListItemCommentsStyles = (): returnObjectStyles => {
marginTop: 2,
backgroundColor: theme?.white,
boxShadow: "0 5px 15px rgba(50, 50, 90, .1)",
boxSizing: "border-box",

":hover": {
borderColor: theme.themePrimary,
Expand All @@ -116,6 +122,7 @@ export const useListItemCommentsStyles = (): returnObjectStyles => {
display: "block",
} as IStyle,
titlesContainer: {
width: "100%",
height: tilesHeight,
marginBottom: 10,
display: "flex",
Expand Down