prev Kozaneba Development Diary 2021-08-25
Ba list sorted by date and time
- A composite index will be needed.
Talk about testing with an emulator and being easy. https://techlife.cookpad.com/entry/2018/11/05/143000
Change Firestore rules to allow read-only sharing
NG, syntax check is fine, but the tutorial test is mocked up by retrieving the past Ba list. firestore rules
service cloud.firestore {
match /databases/ba/documents {
function is_writer() {
return request.auth.uid in resource.data.writers;
}
match /{document=**} {
allow create: if true;
allow update, delete: if resource.data.anyone_writable || is_writer();
allow get: if true;
allow list: if is_writer();
}
}
}
My understanding of the path was wrong.
- Not
/databases/FOO/documents
. - It was
/databases/{database}/documents/FOO/{document}
.
match /databases/{database}/documents declaration specifies that the rule should match the Cloud Firestore database in the project. Currently, each project has only one database named (default).
- Structuring Cloud Firestore Security Rules | Firebase
- I see that the
database' is the
defaultā.
OK rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /ba/{document=*} {
function is_writer() {
return request.auth.uid in resource.data.writers;
}
allow create: if true;
allow update, delete: if resource.data.anyone_writable || is_writer();
allow get: if true;
allow list: if is_writer();
}
}
}
Modified firestore rules to allow read-only sharing.
- Without the emulator, it would have been a lot of trial and error.
- Emulators allow trial and error at hand without waiting for rule updates in the production environment.
Right now, the only control for a place is āchange title,ā but when we start doing more things, there should be a dialog for the place.
- Change of title
- read-only sharing
- By default, if you know the URL, you can edit it.
- Change the URL so that it cannot be edited even if you know it.
- Make a copy
- deletion
Create New
- Maybe open /#new in a new tab from the user dialog?
- ā
Somethingās still not right.
- Displacement when putting an empty group in an empty group?
- It is misaligned when you put an empty group in an empty group and put kozane in that group.
- Should the āempty groupā survive or disappear in the first place?
kozaneba.constants.group_padding = 5; kozaneba.redraw();
before
after
When I try to organize a study session document that has already been written to some extent, the problem is that āimages are not loaded into Kozanebaā.
- Regroup was able to make image stickies, so it can be done in Kozaneba, but not in time for the study group, so itās not the right time.
- I want to import an already indented bulleted list as a hierarchical group.
Look at the test code and identify whatās missing from the test.
- Checking the position of the drag result
- Scroll and Zoom
- Hotkey Testing
- Make sure itās deleted when you delete it in the context menu.
- Opening and Closing Groups
- Edit Group Title
/kozaneba-forum-jp/release-note. 2021-08-26
- user dialogue
- List of existing places sorted by update time
- New āplaceā can be created.
- Same when accessing
/#new
while logged in
- Same when accessing
- Group padding can be adjusted.
- Considering whether to reduce the default value.
I was thinking about arrows, and I tend to think only of the relationship between two terms implicitly, but it could be between N terms separately.
- I tagged the WIP task as WIP.
- Maybe make this one stand out, like a red background or something.
background: blue; color: white;
- The ability to add custom styles would be nice.
- Iāve tried reducing the groupās margin, and itās mostly good, but there are two problems
- Empty groups are garbage.
-
Should the āempty groupā exist in the first place, or should it disappear [src https://scrapbox.io/nishio/2021-08-26Kozaneba%E9%96%8B%E7%99%BA%E6%97%A5%E8%A8%98#61275c3daff09e 00006ef90e]
- But Iād like to express āno bugs so farā in an empty ābugsā group.
- If it has a title, it wonāt disappear?
- Is the reason you get so many empty groups because youāre adding one more piece to the group in the first place?
- No, there are times when you add two or three more cards, so even if you only deal with the case of one card, you still make garbage.
- Is it still appropriate to āautomatically delete empty groups with no titleā?
-
- Difficult to click on a group instead of a middle kozane when the width or height of one kozane is
- min-width / min-height
- Empty groups are garbage.
Try reducing the margin (padding to be exact).
- Thereās a lot to be learned from actually using it.
- Change with user scripts for easy trial.
- If it doesnāt work, I can go back to it right away, so itās easy.
- Oh, this is the same phenomenon as feature toggle?
- There is a stream of thought that leads to it around what eventually became the task (the larger kozane).
- So it may change by sticking with other things before actually starting the project.
- In fact, ādelete empty groupsā has been changed to ādelete empty groups without titlesā.
I think Iāll make the release notes kozaneba tomorrowā¦
User Extension Demo
- Do the unexpected with less code than is useful.
- Can you do that?ā Itās important to be
- Gaming Kozane and Party Parrot
- pomodoro lionfish (Pomodoro unicolor)
- In that sense, Scrapboxās ability to load a linked page and turn it into a kozane by specifying the page is a āconvenient feature with a large implementation scale.
- Itās more of a user extension demoā¦
- killer application
It looked easy enough to do, so I tried it and did it.
Ability to add custom styling
kozaneba.update_style("1629979178768", (s) => {s.background = "blue"; s.color = "white" });
- Itās stored properly on the server.
Groups are not reduced below a certain size, even if empty.
When opening a read-only URL, should it say āThis is read-only, editing will not saveā or not?
- You can default it out, and if you donāt like it, you can turn it off with a user script.
- I donāt think you should push everything into user scripts!ā
For a moment, I thought, āIāll make it configurable via user script and see what users are doing,ā but thatās a sample thatās so biased that it shouldnāt be used for the purpose of determining default settings for the layperson.
Assuming the arrow function is included.
- Ideally, the arrow connecting A and B would be in the forefront when one of them moves.
- All arrows are in front of the box, and there is also a design
- The design of always being on the back is a bit subtle due to the presence of groups
- There could be āpoint to the box in the group.ā
- Whatās inside is basically a front over whatās outside.
I put the release notes into Kozaneba for testing.
-
is lumped in with ādate and timeā, there is nothing more that can be done about it.
-
I canāt sort out the ones that are far apart in timeline but close in meaning.
-
If you throw out the date and time and the chronological flow, you can organize it by meaning.
- But users must have psychological resistance to abandoning the axis of āsomething that is already organized on a certain axisā.
-
Thereās also a way to use arrows to represent the relationship between distant objects.
- Something about the project looks familiarā¦
- https://labs.cybozu.co.jp/blog/nishio/2007/06/pythongrinedit.html
next Kozaneba Development Diary 2021-08-27
This page is auto-translated from /nishio/Kozanebaéēŗę„čØ2021-08-26 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. Iām very happy to spread my thought to non-Japanese readers.