-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalization of the project information structure #151
Comments
A first pass for this generalization has been drafted in #154 Based on the state that is described there, here are a few more specific questions (even though some of them have been mentioned above already)
Many of these questions are related to the idea of a "schema-like" description of the project structure. The complexity of the actual solution for that will depend on the answers to the questions above. I think that we could get pretty far with a simple schema definition. But while fleshing that out, the topic of persistence should be kept in mind. (For example: We could probably add type information to such a schema. But how will that type information be reflected in the database?). Related to that: I stumbled over https://github.com/typeorm/typeorm , which may be worth a closer look. But I assume that we'd try to keep the @weegeekps Maybe you want to add your thoughts, or have a short look at the PR (even though it is an early draft) |
I noticed that the generalization has not been applied at
ProjectProperties , in order to find out the properties that are supposed to be displayed in the bullet point lists. I'll update that soon, and check whether there are other places affected by the generalization.
|
Parts of this had originally been in a comment in anyother PR. But this PR was now narrowed down to the UI changes, so it may make more sense to summarize the points about the "data model" here:
I think that the
IProjectInfo
is the central place that will have to be reviewed and possibly changed in order to generalize the project explorer as to become an "Ecosystem Explorer".The
id
,name
,description
andlink
fields are generic enough to be applicable to basically everything, so they can probably remain as they are.The other fields are already specific for software projects, and maybe even specific for glTF. Some of them have already been part of some discussion - for example,
task
might be changed tokeywords
...In view of #88 , there would be entirely different properties - probably something like
author
andconference
orpublisher
(nah, not all the possible BibTex properties, but maybe some of them...).Now, the specific properties are currently "linked" to the UI part - throughout the code, without any abstraction: Starting at the
IProjectInfo
, they also appear inIUpdateFiltersAction
, various functions, down to thetailwind.config.js
, where the background color of one button is stored via{ theme: { extend: { colors: { filter: { task: "#ffdac1", ... } } } } ...
. This makes it difficult to generalize anything, and every change (even just renamingtask
tokeyword
) would affect every part of the code (and I don't know how someone should find that tailwind config entry - it took me a while to figure out where this color comes from...).I'm not sure about the possibilities or "best practices" for generalizing the UI-specific part, but maybe that can be decided later. Starting from the "modeling side", one could imagine structures like these:
These properties could, very roughly speaking, correspond to the "database schema columns". Then, it would be necessary to be able to access these properties programmatically (and not with
instanceof
). I thought that it would be great to have something that describes the structure of entries similar to a JSON schema:and basically make the
IProjectInfo
generic enough to be able to define the structure of anIProjectInfo
with such a file. (And ... maybe this file could also have a"backgroundColorForTagFilterButton": "0xCAFEBABE"
for each entry...)One could probably make some simplifying assumptions for mapping this to the UI. For example, one could require that each property is just represented as an array of strings. Even if it is something like a
publicationYear
for an "Article": Modeling this as astring[1]
looks quirky, but far less than trying to encode and process(!) arbitrary type information generically.The text was updated successfully, but these errors were encountered: