Use definition lists to define push rule actions

This commit is contained in:
David Robertson 2022-11-17 15:22:54 +00:00
parent d086ec8dfd
commit 08efb55dca
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD
2 changed files with 64 additions and 28 deletions

View file

@ -474,3 +474,31 @@ Make padding symmetrical (this selector is used in the default styles to apply p
background-repeat: no-repeat; background-repeat: no-repeat;
padding-left: 100px; padding-left: 100px;
} }
/* Adjust the styling of definition lists. */
/* Add a little spacing between the term and its definition. */
dt {
margin-bottom: 0.15rem;
}
/* _reboot.scss deliberately sets margin-left to 0. Undo this. */
dd {
margin-left: 2rem;
}
/* docsy's _code.scss does only styles <code> elements matching
* .td-content { p code, li > code, table code }.
* Copy those styles here to apply to code <elements> in definition terms too. */
.td-content {
dt code {
color: inherit;
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
word-break: normal;
background-color: rgba($black, 0.05);
border-radius: 0.25rem; // was $border-radius, but that var isn't accessible here.
}
}

View file

@ -186,19 +186,23 @@ how a notification is delivered for a matching event. The following
actions are defined: actions are defined:
`notify` `notify`
This causes each matching event to generate a notification.
: This causes each matching event to generate a notification.
`dont_notify` `dont_notify`
This prevents each matching event from generating a notification.
: This prevents each matching event from generating a notification.
`coalesce` `coalesce`
This enables notifications for matching events but activates homeserver
: This enables notifications for matching events but activates homeserver
specific behaviour to intelligently coalesce multiple events into a specific behaviour to intelligently coalesce multiple events into a
single notification. Not all homeservers may support this. Those that do single notification. Not all homeservers may support this. Those that do
not support it should treat it as the `notify` action. not support it should treat it as the `notify` action.
`set_tweak` `set_tweak`
Sets an entry in the `tweaks` dictionary key that is sent in the
: Sets an entry in the `tweaks` dictionary key that is sent in the
notification request to the Push Gateway. This takes the form of a notification request to the Push Gateway. This takes the form of a
dictionary with a `set_tweak` key whose value is the name of the tweak dictionary with a `set_tweak` key whose value is the name of the tweak
to set. It may also have a `value` key which is the value to which it to set. It may also have a `value` key which is the value to which it
@ -206,12 +210,16 @@ should be set.
The following tweaks are defined: The following tweaks are defined:
* `sound`: A string representing the sound to be played when this notification `sound`
: A string representing the sound to be played when this notification
arrives. A value of `default` means to play a default sound. A device arrives. A value of `default` means to play a default sound. A device
may choose to alert the user by some other means if appropriate, eg. may choose to alert the user by some other means if appropriate, eg.
vibration. vibration.
* `highlight`: A boolean representing whether or not this message should be highlighted `highlight`
: A boolean representing whether or not this message should be highlighted
in the UI. This will normally take the form of presenting the message in in the UI. This will normally take the form of presenting the message in
a different colour and/or style. The UI might also be adjusted to draw a different colour and/or style. The UI might also be adjusted to draw
particular attention to the room in which the event occurred. If a particular attention to the room in which the event occurred. If a