fix(workspace): hidden bullet actions on phones, no second extract, notice layout
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m20s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m20s
- The floating bullet actions only react to hover on devices with a real pointer; a tap on a phone made the invisible buttons clickable. - A bullet that is only a note link (plus hashtags) can no longer be extracted: button and /extract are hidden, the server answers 400. - Extract notice on phones sits above the bottom navigation, text on top (two lines max) with the actions below. - Release v0.26.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fdd6e38065
commit
68bc4d279c
12 files changed
+78
-27
No files matched your search
@@ -20,6 +20,7 @@ var (
|
||||
ErrBlockNotFound = errors.New("Punkt nicht gefunden")
|
||||
ErrBranchLocked = errors.New("Jemand anderes bearbeitet gerade einen Punkt in diesem Ast. Bitte kurz warten.")
|
||||
ErrMergeSelf = errors.New("Eine Notiz kann nicht mit sich selbst zusammengeführt werden")
|
||||
ErrAlreadyNote = errors.New("Dieser Punkt verweist schon auf eine eigene Notiz")
|
||||
ErrMergeNotOwner = errors.New("Zusammenführen geht nur mit eigenen Notizen als Quelle")
|
||||
)
|
||||
|
||||
@@ -37,6 +38,8 @@ func (s *Store) readCollabDoc(docID string) (*collab.Doc, error) {
|
||||
var (
|
||||
titlePrefixRe = regexp.MustCompile(`^(\s*(-|\*|#{1,6}|\[[ xX]?\])\s+)+`)
|
||||
titleTagRe = regexp.MustCompile(`(^|\s)#[\p{L}0-9_-]+`)
|
||||
// A bullet that is only a link to a note (with hashtags), as left behind by ExtractBranch
|
||||
noteLinkOnlyRe = regexp.MustCompile(`^\s*\[\[[^\]]+\]\](\s+#[\p{L}0-9_-]+)*\s*$`)
|
||||
)
|
||||
|
||||
// branchTitle makes a note title from a bullet's text (without hashtags) and returns the hashtags,
|
||||
@@ -116,6 +119,9 @@ func (s *Store) ExtractBranch(userID, docID, blockID string, a collab.Actor, lea
|
||||
return nil, "", ErrBlockNotFound
|
||||
}
|
||||
root := flat[start]
|
||||
if noteLinkOnlyRe.MatchString(root.Content) {
|
||||
return nil, "", ErrAlreadyNote
|
||||
}
|
||||
var children []domain.DocumentBlock
|
||||
ids := []string{root.ID}
|
||||
for i := start + 1; i < len(flat) && flat[i].Level > root.Level; i++ {
|
||||
|
||||
Reference in new issue
Block a user