Skip to content
Closed
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
5 changes: 5 additions & 0 deletions ui/src/message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const useStyles = makeStyles()((theme: Theme) => ({
},
'& pre': {
overflow: 'auto',
maxWidth: '100%',
borderRadius: '0.25em',
backgroundColor:
theme.palette.mode === 'dark' ? 'rgba(255,255,255,0.05)' : 'rgba(0,0,0,0.05)',
Expand Down Expand Up @@ -168,6 +169,10 @@ const Message = ({
style={{
display: 'flex',
flexWrap: 'wrap',
width: 'fit-content',
minWidth: 'min(700px, 100%)',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work sometimes. E.g. with this messages

{
  "title": "hello",
  "message": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
  "priority": 5,
  "extras": {
      "client::display": { "contentType": "text/markdown" }
  }
}

{
  "title": "hello",
  "message": "![](https://placecats.com/600/400)",
  "priority": 5,
  "extras": {
      "client::display": { "contentType": "text/markdown" }
  }
}

Both messages should have 700px width. as the width is for better readability of text.

Image

maxWidth: '100%',
margin: '0 auto',
borderLeftColor: priorityColor(priority),
borderLeftWidth: 6,
borderLeftStyle: 'solid',
Expand Down
1 change: 1 addition & 0 deletions ui/src/message/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const Messages = observer(() => {
return (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR: would you be open to a separate PR adding an optional WebUI settings/preferences section?

The idea would be to keep all current defaults unchanged, but allow users to customize some UI preferences explicitly from the WebUI. For example, message layout/display preferences could live there instead of changing the default behavior for everyone.

Yes, we're open to that, but generally it's better to first create a ticket for proposed changes.

I prefer good defaults instead of settings but for some things like: Date format, message layout, relative/absolute time a setting would be okay. The discussion about possible changes could result in just changing the behavior instead creating a toggle for the feature.

When creating PRs please create separate PRs for each feature, so that we don't have a big changes, and can merge the subsets that don't require much discussion faster.

<DefaultPage
title={name}
maxWidth={1600}
Comment thread
jmattheis marked this conversation as resolved.
rightControl={
<div>
{app && (
Expand Down