aiidalab / aiidalab/aiidalab-widgets-base

Better design of `_StructureDataBaseViewer` and `StructureDataViewer`

Abierto
#342 3 comentarios 1 reacción 3 asignados Reclamado por @unkcpz Ver en GitHub
Lenguaje dominante
Python
Estrellas
10
Forks
19
Merge medio
1 d 22 h
PR fusionados (30 d)
20

Descripción

As a developer, one would like to have a clear separation of concern between `_StructureDataBaseViewer` and `StructureDataViewer` allowing for easy further improvements and modifications.

The base class is meant to provide a common functionality of structure viewer and (yet to come) trajectory viewer. Unfortunately, due to some design flows it cannot be easily done with the current implementation.

Herein, after a meeting with @unkcpz and @danielhollas, we agreed to have a closer look at those two classes and come up with a better design.

## Known issues

1. Both `structure` and `displayed_structure` traits are defined in the `StructureDataViewer` class but used in `_StructureDataBaseViewer`.
2. Point 1. also makes it impossible to use `_StructureDataBaseViewer` as the base class for the trajectory viewer.
3. An addition of new displayed properties requires new traits to `_StructureDataBaseViewer`, which is not optimal as most of the features are stored in the `structure` trait.

Pinging @danielhollas and @unkcpz for additional input.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.