previous code was assuming too much the context of the data structure.
in chat the AST works on a single node base (?), in notebook on a
multi node base.
this commit move the previous code from inside the single stitch function to
the area where the final AST is stitched together.
- only resize when necessary (check the container's height)
- refactor CSS: use position relative / absolute to stack Buffers instead of display:none; this affects the calcuations used by fit()
- fix dark mode styles, tweak viewport height (100vh --> 99vh) to prevent overflow scroller
This still leaves an empty root node which does not take up visual
space though. A more comprehensive approach would be to filter out
plain URL links from the graph, eg from the function
```
t[1].children.map(c => {
if (c?.children) {
let links = [];
c.children.filter(k => {
if (k.type === 'link') {
links.push({
type: 'root',
children: [
{
type: 'graph-url',
url: k.url
}
]
})
}
})
c.children.push(...links);
}
});
```
this commit suggests a possible UI to put back the rich embed URL
right below (aka in context) the block where the plain URL has been
inserted. in this way when pasting a URL the formatting does not break
and yet a richer UI is still rendered.
as of now, a blockquote would discard any other content after
a URL and would put it on a new line.
eg '> some text https://urbit.org this is urbit' would be rendered as
```
> some text https://urbit.org
this is urbit
```
this commit joins all content inside of a blockquote as one block.
this change removes rich embed URLs in order to not break text flow. eg
when writing a sentence with a URL, before this commit the UI would
display the URL as its own block on a new line, plus anything
afterwards it (originally on the same line of text), would be
displayed on a new line as well.
A previous change updated group state to use arrays instead of sets, due
to the ease of (de)serialisation. This was not total, and resulted in a
bug in the ChannelPermissions component
- debounced resize event listener
- new Buffer#onSelect: resize, focus, and pokes `herm` with updated rows / cols
- simplify container ref implementation (no need for a callback ref), remove isOpen hack
- add lodash for debounce
- Tab#onClick no longer handles focus (it's now handled by Buffer#onSelect)
Removes the "Share private profile?" text and button that appear
at the top of the chat window when the ship has not opted in to sharing
their profile.
fixesurbit/landscape#1195
Having the origin at the top left instead of the bottom left is more
conventional and ergonomic. The only thing this complicates is
prompt-specific logic, where we care about the coordinates of the
bottom-most line on the screen.
For that reason, the bulk of the changes here are in vere, where we
treat the bottom-most line specially, drawing the spinner onto it.
Webterm is likewise updated to account for the new coordinate system.
Drum now opts to accept clicks anywhere on the screen, and does its best
to move the cursor as close to the clicked location as possible (within
the confines of the prompt).
Presumably due to how js non-objects work in closures, the selected prop
we were reading out whenever a blit came in was stale.
Also, it was possible that a bell was hiding inside a %mor blit, so we
add a small helper for checking properly.
%rez has always used "width & height". Certainly, "x & y" is more
standard than "row & column". As such, we settle on making %hop and %hit
respect the more natural ordering. This change is safe because these
interfaces haven't made it to livenet yet.
This undoes some of the code-splitting done previously as it didn't
affect performance enough, and was actively hurting it in some ways.
Instead this moves the subscription initiation higher and adds scries
for critical data. This also shuffles the calls in App's useEffect so
that they are more colocated with relevant concerns.