Skip to main content

Module note_row

Module note_row 

Source
Expand description

One note as a row of a list: who wrote it and when, what it says, its images, its videos, the notes it quotes, and a preview of the web page it links to. The feed, a thread and the notes on a profile are lists of these.

The authorโ€™s picture sits beside their name, and what they wrote runs under both, the full width of the list. Set in beside the picture, a note would leave a margin as wide as the picture empty all the way down.

How large a row is set is the readerโ€™s to say, in the settings: see RowSizes.

A long note is cut, and says so with a button under its text that shows the rest where the note is, in its row: nothing above the row moves, and what is under it makes room. Under all of the text the button shows less again. See Reading.

Structsยง

Faces ๐Ÿ”’
What text a note marks is set in, beside the size and the face all its text has: the faces of what is stressed and of code, and the colours of what is quiet and of what is behind code.
Reacting
What a row is told of reacting to notes.
RowContext
What every row of a list is built with, beside its own note.
RowSizes
The sizes a row is set in, all from one: the size of a noteโ€™s text, which the settings keep.

Enumsยง

Bookmarking
What a row is told of the accountโ€™s bookmarks.
NoteLink ๐Ÿ”’
Where a click on part of a noteโ€™s text leads.
Reading ๐Ÿ”’
How much of what a long note says is shown.

Constantsยง

BEHIND_CODE_ALPHA ๐Ÿ”’
BOOKMARK_REASON_MAX_CHARS ๐Ÿ”’
How much of why the bookmarks could not be read is said to whoever points at the bookmark action.
CHAR_WIDTH_PER_SIZE ๐Ÿ”’
CODE_BLOCK_PADDING ๐Ÿ”’
Lines of code that stand apart: the room around them, and the corners of what is behind them.
CODE_BLOCK_RADIUS ๐Ÿ”’
CODE_CHAR_WIDTH_PER_SIZE ๐Ÿ”’
How wide a letter of code is, as a share of its size: all of them are.
CODE_PADDING ๐Ÿ”’
CODE_RADIUS ๐Ÿ”’
The corners of what stands behind code, and how far it reaches past the code at either side. It takes no room: the text is where it would be without it.
FIGURE_WIDTH_PER_SIZE ๐Ÿ”’
How wide a figure of a count is, as a share of the countโ€™s size, at the most.
FOLD_GAP ๐Ÿ”’
FOLD_PADDING_AFTER ๐Ÿ”’
FOLD_PADDING_BEFORE ๐Ÿ”’
FOLD_PADDING_Y ๐Ÿ”’
The button under a long noteโ€™s text, which shows more of it or less: the room above and under its label, the room before the label and after the arrows beside it, and the gap between the two. Less room after than before: the arrows are drawn well inside the square they are given, and what shows on either side is then the same.
HEADING_SCALES ๐Ÿ”’
How much larger than the text the headings of the first three levels are. The others are as large as the text, and bold as these.
LINE_HEIGHT_PER_SIZE ๐Ÿ”’
What estimated_note_height assumes of text it hasnโ€™t seen laid out: how tall a line is and how wide a character is on average, both as a share of the textโ€™s size. Read off rows laid out with the real text renderer; the_estimate_is_close_to_the_measured_row holds them to it.
MARK_RADIUS ๐Ÿ”’
How round the corners of the line around the marked row are.
MENTION_WIDTH_CHARS ๐Ÿ”’
How many letters wide someoneโ€™s name is taken to be, in a cell of a table, before it is known who they are.
NOTE_ACTION_DIM ๐Ÿ”’
How much dimmer than the text an action is that hasnโ€™t been taken.
NOTE_ACTION_GAP ๐Ÿ”’
The gap between an actionโ€™s icon and the count beside it.
NOTE_ACTION_PADDING ๐Ÿ”’
The line of actions under a note: how much room each action has around it.
NOTE_ACTION_WIDTH ๐Ÿ”’
How wide each action is, count and all, so that the same action sits at the same place in every row whatever the counts are. Narrow enough that the four of them and what is at the right end of the line all have their room in the narrowest popup, at the largest size.
NOTE_AVATAR_GAP ๐Ÿ”’
NOTE_AVATAR_SIZE ๐Ÿ”’
How wide the authorโ€™s picture is, and the gap between it and their name.
NOTE_DIVIDER_HEIGHT ๐Ÿ”’
The thickness of the line under a row.
NOTE_IMAGE_FALLBACK_HEIGHT ๐Ÿ”’
NOTE_IMAGE_RADIUS ๐Ÿ”’
A noteโ€™s image is shown as wide as the note, from one edge to the other, unless it is narrower than that itself (see shown_size), with its corners rounded this much. Until it has loaded it is given the room it will take, if the note says its size, and this height if not.
NOTE_PADDING_TOP ๐Ÿ”’
Space above a rowโ€™s content, and between its parts.
NOTE_SPACING ๐Ÿ”’
QUIET_TEXT_ALPHA ๐Ÿ”’
How much of the textโ€™s colour what a note quotes is set in, and how much of it stands behind code.
RULE_ALPHA ๐Ÿ”’
RULE_HEIGHT ๐Ÿ”’
A rule between two parts of a note: how thick, and how much of the textโ€™s colour.
TABLE_HEAD_LINE_ALPHA ๐Ÿ”’
How much of the textโ€™s colour the line under the first row of a table is, and the lines under the others.
TABLE_LINE_ALPHA ๐Ÿ”’
UNMEASURED_LIST_WIDTH ๐Ÿ”’
How wide a list is taken to be before it has been laid out once: as wide as the popup opens, less the room around the list.
WHO_AVATAR_SIZE ๐Ÿ”’
How wide the picture of one of them is.
WHO_MAX_HEIGHT ๐Ÿ”’
WHO_ROW_HEIGHT ๐Ÿ”’
WHO_WIDTH ๐Ÿ”’
How wide the list of who left something on a note is, how tall one of them is in it, and how tall the list is at the most: more of them are scrolled to.

Functionsยง

action_button ๐Ÿ”’
One of a noteโ€™s actions, to be pressed: its icon in color, the count beside it when there is something to count, and what pressing it does, if anything.
action_cell ๐Ÿ”’
action, one of a noteโ€™s actions, in the room every action is given.
action_height ๐Ÿ”’
How tall the line of actions under a note is: its icons or its counts, whichever are taller, and the room around them.
action_showing ๐Ÿ”’
As action_button, with picture where its icon would be: what is no icon, as the emoji a note was reacted to with.
block ๐Ÿ”’
What stands apart from a noteโ€™s text: lines of code, on what stands behind code, from one edge to the other; a rule; a table.
block_height ๐Ÿ”’
How tall what stands apart from a noteโ€™s text will be, near enough: lines of code wrapped at how many of its letters fit, a rule, and a table of rows a line of text tall each.
bookmark_action ๐Ÿ”’
The bookmark action of note: a ribbon, filled and in accent when the account has the note bookmarked, which pressing it changes. It shows the change at once, while the changed list is on its way. None for an account that keeps no bookmarks.
counted ๐Ÿ”’
action, one of a noteโ€™s actions that counts what others left on it, with who they were under it for whoever asks: a click on it with the right button shows them, and one anywhere else puts them away. own is what the action itself opens under it, if it opens something and that is open, and what closing it says.
estimated_note_height
How tall a noteโ€™s row will be, near enough, before it has been laid out, set in sizes in a list width wide: what the note says, all of it if a long one shows in_full, and around it the room above, the authorโ€™s picture or their name beside it, whichever is taller, the line of actions, and the line under the row. The list replaces this with the measured height once the row has been in view.
fold_button ๐Ÿ”’
The button under the text of the long note id: it shows the rest of the note where it is, in a row that shows it cut, and cuts it again in one that shows it in_full. In the middle of the row, as tall at every size as fold_height says; the way to more stands out as a button does, and the way back is no louder than the actions under it.
fold_height ๐Ÿ”’
How tall the button under a long noteโ€™s text is: its label, and the room above and under it.
line_height ๐Ÿ”’
How tall a line of text of size is.
link_line
A link on a line of its own, in text of size: a picture that could not be shown, a website.
marking
row, the row told apart by id, with a line around it in the accent colour if it is the one the keyboard is at. The line is drawn over the rowโ€™s edge and takes no room: a row is the same size marked and not.
note_actions ๐Ÿ”’
The line of actions under a note: answer it, repost or quote it, react to it, zap it. Each says how many did (for zaps, how many sats); the accountโ€™s own repost and like are in accent. Reposting opens a menu under the action, which a click anywhere else puts away. An account that canโ€™t publish sees the counts of the first three and can press none. Anyone can zap an author who has a Lightning address. At the right end, copying a link to the note, bookmarking it, and, once that is known, how many relays it was seen on.
note_being_written
A note that is being written, as its row would show it once it is out: who writes it, and all it says. Without the line of actions and the line under a row: there is nothing to act on yet, and no row after it.
note_image ๐Ÿ”’
One of a noteโ€™s images: the picture, once it is here; the room it will take, until then; and if it canโ€™t be had, the link it came as.
note_row
One row: the authorโ€™s picture, and beside it who they are and how long ago they wrote; under those, as wide as the row, what the note says and the line of actions; and under it all a line that sets the row apart from the next. The picture and the name lead to the authorโ€™s profile.
note_text ๐Ÿ”’
What a note says, the segments of it: its text as rich text, and what stands apart from the text between the stretches of it, one under the other.
opening_profile ๐Ÿ”’
part, a part of a noteโ€™s row that stands for its author, opening their profile when it is clicked.
opening_thread
row, the row of the note id, opening that noteโ€™s thread when it is clicked anywhere that doesnโ€™t lead somewhere of its own (a link, a picture, the author). Not while a menu is open over the list: a click on a row beside the menu was meant to put the menu away, and that is all it does.
parts ๐Ÿ”’
The parts what a note says is shown in, one under the other: each stretch of its text, and each thing that stands apart from it.
reaction_action ๐Ÿ”’
The reaction action of note: a heart, with how many reacted. Pressed, it offers what to react with under it (see reaction_menu), over it where there is no room under, and a click anywhere else puts the offer away. Once the account has reacted it shows what with, in accent: the heart filled, or the emoji in the iconโ€™s place, set no taller than the line. Once is enough: it canโ€™t be pressed again.
relay_name
What a relay is called: its address without the scheme, which is the same for nearly all of them, and without a slash at its end.
repost_menu ๐Ÿ”’
What the repost action offers for the note id: reposting it as it is, which is done once (reposted) and not again, or quoting it in a note of oneโ€™s own. The one the keyboard is at, if it is at one, is shown as one the pointer is over.
rich ๐Ÿ”’
spans as text of the noteโ€™s size, width wide.
said ๐Ÿ”’
column, with what note says under what is in it already: its text, as much of it as reading says, with the button that shows more of a long one or less; its images, its videos, the notes it quotes (each as a card if it is at hand, and as a link if not), and the preview of the page it links to.
said_height ๐Ÿ”’
How tall what note says will be, near enough, set in sizes in room width wide and read as reading says, with the space above each part of it: each line of its text wrapped at a typical line length, the button under a long one, each image at the height it will be shown, each video in the room it has, each note it quotes as its card or its link, and the preview of a page it links to, which is the height it is.
seen_on ๐Ÿ”’
How many relays a note was seen on, for the right end of its line of actions: nothing to press, and which relays they were for whoever points at it. Set as an action is, so that it lines up with them.
seen_on_width ๐Ÿ”’
How wide the room is that is kept at the right end of a line of actions for how many relays the note was seen on: its icon and a count of two figures. Kept before that is known as after, so that the bookmark beside it stays where it is when it comes.
share_action ๐Ÿ”’
The share action of note: two links of a chain, which copy a link to the note that anyone can open. Once that is done it is a tick, in accent, until the popup closes or another noteโ€™s link is copied.
spans ๐Ÿ”’
The pieces segments of a noteโ€™s text, as spans: links and mentions can be clicked, and they and hashtags are set in accent; what the note marks is set as it marks it. stressed, all of it is bold: what says what the columns of a table are.
stands_apart ๐Ÿ”’
Whether segment stands apart from the text.
who_and_when ๐Ÿ”’
The first line of a row: the picture of who wrote note, their name, and how long ago they wrote it.
who_did ๐Ÿ”’
What one of those who left something on a note left, at the right end of their line: the emoji they reacted with, or a heart; how much they zapped; and nothing for a repost, which is all the list says.
who_menu ๐Ÿ”’
Who left something on a note, under the count of them: what the list is of, and each of them on a line, with their picture, their name and what they left. A press on one opens their profile. Until the store has been read it says so, and if nobody did, that.