oaregithub / oare_mono

1 stars 0 forks source link

Add properties to Seal Impressions in Text View #1109

Open edstratford opened 2 years ago

edstratford commented 2 years ago

Seal impressions are ideally linked to the entry we have for the seal the created them, to who was using the seal in that instance, and their orientation.

On front-end, display a 'properties' icon (see mockup for a suggestion) to the left of the Seal Impression. This will allow user to add properties. In this position the properties will default to the Primary Classification - Seal Impression part of the properties taxonomy.

Generally speaking, we will want to add properties in lots of places, and depending on the item that we are adding properties to, we will want to scope the properties to particular parts of the properties tree. So, we should use the code that already allows for adding properties to texts on import, and ensure that the module can be used in lots of other places in addition to these two.

Suggested mockup: image

jbro-lab commented 2 years ago

@edstratford okay I'm having a hard time understanding this problem. I know that we're trying to add properties to Seal Impressions that are in the text view, but where exactly are seal impressions located in the database? I've seen "Seal Impression" as a property in the taxonomy tree, but I just don't know where or how they are linked to texts.

edstratford commented 2 years ago

Good questions. Let's start with some concepts. A seal is like a stamp. One stamp might say 'Approved by Justis' on it. Another my say 'Approved by Prof. Stratford.' Eventually, these stamps just say 'Justis', or 'Prof. Stratford' and maybe have a little drawing associates with them.

Let's say there are maybe 3000 stamps (seals) out there. (we don't know the exact number, but there are at least 1000 different ones we can already catalogue.) Some are literally stamped on (pushed directly down), but most are rolled on, like a paint roll with a pattern on it.

From the 12000 texts we have in the database, about 1500 have one or more seals stamped/rolled on them. And the 'Justis' stamp is one maybe 20 different texts.

On an individual text, we have 'Seal Impression' or 'Seal Impression A' etc. -- all that is right now is a note that one of these seals has been applied on this line in this space on the text. Which seal ('Justis', or 'Prof. Stratford', or some other seal from the 1500 possible) has not yet been entered into the database.

So an impression is a place where a stamp has been impressed.

So we will attach properties to the text_epigraphy row-- the following properties as able:

image

So: Primary Classification(VAR) = Seal Impression (VAL) Impressed Seal (VAR) = (link to spatial_unit table) Orientation (VAR) = (default to "Top of Seal at 0 degrees)" Seal User (VAR) = (link to person table)

The Orientation variable is a straightforward choice. However, the other two are 'link' variables. Therefore, they will need an augmented picker to select which item in the listed table would apply. And these pickers, because they will be long lists will need to have a search element to them, and in some of them, such as the 'Impressed Seal' one, they will need to display a seal image.

It may be necessary to finish the Seals page before doing this ability, because the picker for the seals, should essentially be a pop-up (or whatever will work) of the Seals page with an opportunity to select.

THe list of uuids from the spatial_unit tablet from which to pick is defined by this query: SELECT * FROM spatial_unit WHERE type = 'object' AND tree_abb = 'seal_cat'

However, it will need item_properties for these rows, so the fuller information comes from

SELECT * FROM spatial_unit su LEFT JOIN item_properties ip1 ON ip1.reference_uuid = su.uuid where su.type = 'object' AND tree_abb = 'Seal_Cat';

And I need to attach a bunch of images to these seals, which requires me to add a property pointing to the resource table. I can get on that this weekend. But I won't make too much progress in the next few days. Apologies