Skip to content

Conversation

@AlexShmak
Copy link
Collaborator

Add textbox tool for creating comments on canvas:

  • Implement textbox tool with configuration form
  • Add new side panel for tools (switch using arrows)
image
image

Comment on lines +112 to +144
.side-menu-header {
position: relative;
text-align: center;
padding: 6px 28px;
}

.side-menu-header span {
font-size: inherit;
user-select: none;
}

.side-menu-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
font-size: 1.2rem;
color: #6c757d;
opacity: 0.6;
}

.side-menu-arrow.left {
left: 6px;
}

.side-menu-arrow.right {
right: 6px;
}

.side-menu-arrow:hover {
color: #000;
opacity: 1;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С новым side menu мне кажется очень крутая идея 👍 Учитывая что скорее всего ещё новые устройства появлятья будут

node_id: str = node.data.id # network device name(label)

if node_type == "textbox":
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может быть стоит сделать фильтрацию просто по всем неизвестным типам, а не конкретно по текстбоксам? А вообще, хорошо было бы, чтобы бэкенд ничего не знал о текстбоксах

Copy link
Collaborator Author

@AlexShmak AlexShmak Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Окей, посмотрю как лучше на бэке отфильтровать подобные элементы

"""

config: NodeConfig
config: NodeConfig | TextboxNodeConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TextboxNodeConfig же унаследован от NodeConfig. Кажется явно не то что-то с абстракциями

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Справедливо, изначально так и сделал, но почему-то сломалась десериализация. В целом если текстбокс будет все равно отфильтровываться (в будущем исправлении), то он и не дойдет до этого момента

default_gw: str = ""


@dataclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще, под Node на бэкенде раньше понималось network node, т.е. какое-то сетевое устройство. Кажется, как будто отдельный TextboxNodeConfig немного нарушает эту идею

  • не очень понимаю, textbox это же чисто элемент фронтенда, зачем он в эмуляторе?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На бэке перебираются все ноды и десериализуются. Изначально подумал, что node на бэке -- cytoscape node.
В таком случае можно отфильтровать текстбоксы и не обрабатывать (предыдущее обсуждение), согласен, сделаю

Copy link
Contributor

@d-zaytsev d-zaytsev Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На бэке перебираются все ноды и десериализуются. Изначально подумал, что node на бэке -- cytoscape node

Если бы в проекте бэкенд и эмулятор были корректно разделены, то путаницы наверное бы не было


# Режим работы: dev (локальный PostgreSQL) или prod (Yandex Cloud PostgreSQL)
MODE=prod No newline at end of file
MODE=dev No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😠😠😠😠😠😠😠😠😠😠😠 надо этот файл в .gitignore добавить

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

По-хорошему он там должен был быть уже давно (изначально), текущие .env с примерной конфигурацией стоит оставить с MODE=dev и переименовать во что-то, вроде example.env. Занести в .gitignore и не трогать продовый .env

Copy link
Contributor

@d-zaytsev d-zaytsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Несколько моментов на подумать написал

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants