image

prev Kozaneba Development Diary 2021-08-21

Note to re-launch the development environment since the OS was rebooted.

  • Changed the local directory name from movidea to kozaneba since it was a good opportunity.

  • $ code kozaneba

  • devserver

    • $ npm start
  • Cyperss

    • $ npx cypress open
  • Firebase Local Emulator

    • $ firebase emulators:start
      • PS
      • $ firebase emulators:start --import firebase_emulator_data
  • Rename each terminal.

    • image
  • Iā€™ll run the test for now.

Check which process is occupying the port sudo lsof -i tcp:<port> 
Kill the process kill -9 <process id>
    - Only the Firestore emulator was alive.
        - No -9 on kill.

ts

/// <reference types="cypress" />
 
import { ready_nested_group } from "../../support";
 
describe("ready nested groups", () => {
  beforeEach(() => {
    cy.visit("/#blank");
    cy.viewport(500, 500);
    ready_nested_group();
  });
  it("do nothing", () => {});
});

image ts

  it("do nothing", () => {
    cy.testid("G1").then((x: any) => console.log(x[0].style.cssText));
    cy.testid("G1").trigger("mousedown", 0, 0, { force: true });
    cy.testid("G1").then((x: any) => console.log(x[0].style.cssText));
    cy.testid("G1").trigger("mouseup", 0, 0, { force: true });
    cy.testid("G1").then((x: any) => console.log(x[0].style.cssText));
  });

image

ts

  it("should not move when click", () => {
    cy.testid("G1").then((x: any) => {
      const {top, left} = x[0].style;
      cy.testid("G1").trigger("mousedown", 0, 0, { force: true });
      cy.testid("G1").trigger("mouseup", 0, 0, { force: true }).then((x: any) => {
        expect(x[0].style.top).eql(top);
        expect(x[0].style.left).eql(left);
      });
    });
  });

The problem is that the coordinates are out of order when the context menu is displayed,

  • Iā€™ve noticed that it happens with selections and fixed it, but Iā€™m not sure if it also happens with groups in some casesā€¦
  • Caused by code that resets top/left values tweaked while dragging, which also occurs on click
  • Youā€™ve got clicks and drags that are now caused by a form of mouseup/down combination that does its own thing.
  • The internal state has not changed, so ignoring it and doing something else will fix itā€¦ but normal users will try to fix it if the display is brokenā€¦

When I try to title a group of groups, I donā€™t get the text of grandchildren kozane in the default value.

  • The default value is ā€œthe title of the item in the group is connected to the default valueā€, so a group without a title is just a blank line.

Iā€™ll write later in the release notes.

  • Include the contents of untitled groups in the default value when editing group titles.
  • Fixed a bug where creating a group and deleting a selection was not considered an update and was not saved to the cloud.
  • Fixed a bug that caused the display to temporarily shift when clicking to bring up the context menu.
  • Improved loading display

Wanted features

  • Place list in order of update
  • Save Place As
    • Would you like to be able to lead-only at this time?

Weā€™ll have to write the Firestore rules properly to make lead-only a reality.

next Kozaneba Development Diary 2021-08-26


This page is auto-translated from /nishio/Kozaneba開ē™ŗę—„čؘ2021-08-25 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.