-
Notifications
You must be signed in to change notification settings - Fork 13
seeds entry #35
Comments
Is there any ruleset behind this that we can follow? how can we infer the "Sorte" if Art is a free text that can have any random input or do you mean the "Kategorie"?
Which column in the seeds table would that be stored into? Currently we only have the variety_id to reference a specific Sorte
Currently the backend only allows requests from localhost:5173 or 127.0.0.1:5173 due to cors, see backend but this is something we have to change anyway as soon as we deploy it. Preferrably we add a field to the .env so we can configure it
abort button confirmation is currently still in todo since I was unsure from which site we can enter the seed entry form, but generally we can just navigate to the previous route |
for overview: bezugsjahr, art, sorte, herkunft, (edited at) |
Please ask if anything is unclear. |
I have to revert my previous algorithm. It is too complicated and the needed data about Kategorie is not in the database. So let us simplify it and:
@buenaflor note that #42 completely redefines the varieties table (it is currently called plant_details there). So we need to coordinate together to get this release done. Maybe we should have a short meeting in the beginning of the week to clarify table names etc. of the database. |
I'm currently working on this issue. Should I add a VARCHAR "variety" to the database in place of variety_id for now? |
|
I added
in the top field. They occurred when testing #77. |
I added
You can fill up the database by running "npm run insert data/detail.csv" in scraper. |
…t_year The aim of this commit is to prefill the year input field in the seed creation dialog with the current year (As requested in #35). This is accomplished by adding a new defaultValue prop to SimpleFormInput.
@badnames @buenaflor Which points are currently being worked on? Where do you need help? |
Paul will look into the network errors. |
@buenaflor Told me he is working on the seeds page. I will be taking on these two minor tasks:
If there is some time left in my schedule, I may also start working on this issue:
|
Looks great, we are coming to the end spurt. I added:
@Bushuo can you take this over? |
@markus2330 Sure, I will do that in coordination with @badnames |
@markus2330 I've been working on this yesterday and today. First of, we need to find some way of storing the chosen date resolution (day, month or year) in the database. This by extension will translate to added code complexity in the backend and thus more effort when implementing new Features that make use of the "best by" date in the future. Furthermore designing an appropriate UI component, that is not too confusing or overly complicated is not a trivial task. Please don't misunderstand me, this feature is certainly doable within this week. |
@badnames I agree, let us stay with the current solution. Much more important is that we get the data from the plants when creating seeds. |
I just talked to @Bushuo. We came to the conclusion that existing plants can already be accessed in the seed form. Since this would be a major performance issue if the database is filled with scraped data (causing megabytes of unnecessary data to be transmitted on page load), we will now focus on this new issue. |
Did you already try to import all data from the scraper and see if you can search for plants (for both species and variety)? |
Hi @markus2330, we are a little bit at a loss here. What is the purpose of the Currently the dropdown |
It contains all species and some varieties plants that seeds might be from.
Yes, both species and varieties should be populated by the plants table. (is_variety will tell you how to distinguish)
Did you look at the scraper/README.md? Was there an error when running You can ask @aidnurs about both plants table and the scraper (he is the author). |
@markus2330 Thanks, for the quick answer.
Yes, I read it. There was no error, and
Where is this field |
I have added a temporary SQL script in our branch, that moves the data from
Are we already supposed to convert the variety field back to a plants table reference? |
Ok, now I understand where you confusion comes from, I am now also confused. In "scraper/data/detail.csv" there is a "Is Variety" but it seems like it does not get mapped to the plants in the database? So probably the code that inserts the data is incomplete. But with the proposal below this does not matter anymore as variety and plants are basically treated identical in the search field, so you don't need is_variety.
Obviously our old proposal is too complicated (as there were already several such confusions by different people). So let us simplify again. There should be two fields:
Example 1: The user searches for "Brokkoli" in plant search field (which is the German common name for a variety), and then can write Purple Sprouting as additional name. Example 2: The user searches for "Tomato" in plant search field (which is the English common name for a species) and then can write Glühbirnchen as additional name (which would be the variety in this case). The huge advantage of this simplification is that this plant search field will be the identical as we will use in the plant layer usecase. (It has a small downside if there are many varieties, like for pumpkin or tomatoes, but this should be fixable with a clever ranking algorithm that offers "normal" pumpkin or tomatoes as first option.) |
So just to make sure what needs to be done now: is there any purpose left in having a seperate |
I think this is an optimization. It was done by @aidnurs, so it is best if he tells us. I agree that something like this should be documented, there is the issue #97 but this particular piece (documenting tables) maybe is better done next to the SQL code? @badnames what do you think? Where were you searching for information what plant_detail could be? |
Ok, thank you for the answer. Then we will keep the table for now. I was searching in the SQL migrations and in issues/PRs. |
@markus2330 Can you please confirm that the remaining issues from your inital comment have now been fixed? |
still doesn't work. What I mean is: going with tab to the field, and then pressing up and down should change the entry. (It might be actually okay and only visual problem that I don't see what is active).
also doesn't work, should work like "Cancel" works Then a few renames/simplifications/reorderings:
everything is also updated in top-post. |
@badnames @markus2330 I would take a look at this later today. |
It was indeed a visibility problem. I fixed the styles on our branch @badnames |
Great job, only a few items left! 🚀 |
How is progress? Are there further problems? |
@markus2330 Working on the frontend right now. |
let debug = diesel::debug_query::<diesel::pg::Pg, _>(&query);
println!("\nQuery: {}", debug); Using the
EDIT: Was our enum conversion. |
@markus2330 In modern browsers it is not possible to display custom content in the |
Great, good to see that you are on it! ❤️
It is usually best if you show the full code in a PR, then it is easier to understand what you did and it can even be debugged.
So it works now?
If it is possible to only show it if there are actual changes (like with pressing abort), yes please. |
npm run dev -- --host 0.0.0.0
)We entered:
The text was updated successfully, but these errors were encountered: