Carbon-Farm-Network / app-carbon-farm-network

GNU Affero General Public License v3.0
1 stars 0 forks source link

Filter actions on dropdowns on modals #97

Closed fosterlynn closed 6 months ago

fosterlynn commented 6 months ago

This is a "nice to have", but I don't want to wait too long, as it will help users' general understanding of how things are structured.

We can limit the action dropdowns as follows:

Note: I don't know if the inputOutput behavior, and other behaviors, are in hREA.

fosterlynn commented 6 months ago

Looks like the actions are not up to date in the graphql spec or in hREA. I'll do a PR for graphql for the newer behavior fields. It may take a while for hREA. In the meantime, I think it will be worth it to hard-code the dropdowns as follows (but using the real actions):

Inputs (ids): consume, use, work, cite, pickup, accept, combine, deliverService (label deliver service).

Outputs (ids): produce, deliverService (label deliver service), dropoff, modify, separate.

deliverService is probably not the id in hREA. It is probably deliver-service. Also the label is now deliver_service and it's fine to just use the label that is there now, rather than creating another piece of work for when it gets updated in hREA. Whatever is easy.

fosterlynn commented 6 months ago

One more thought on this one. Would it be easier all round to update the id and label data for the actions now in hREA, and leave the additional fields for later? I don't know if the data is hard-coded in hREA, or loaded from script, or what. But then we wouldn't need to make any UI changes when the whole thing gets updated in hREA. (We would still hard-code the filters, and we could leave that.)

If we do that, I'll track down anyone who is actually using them as-is now. But it is probably nobody, since really deliverService is the only change.

Any actions that are on my list above, but not currently in hREA, we don't need to add if it is extra work.

LeosPrograms commented 6 months ago

If I take the actions from hREA and filter them as described, the lists are input: pickup, consume, use, work, cite, accept output: dropoff, produce, modify, pass, fail, deliver-service

fosterlynn commented 6 months ago

Those are pretty good lists, but let's get rid of pass and fail. Those aren't actions any more, so whatever is easiest, but you can feel free to delete those in hREA if that is easiest.

fosterlynn commented 6 months ago

Those are pretty good lists, but let's get rid of pass and fail.

On second thought, let's just not worry about pass and fail, they won't bother anyone for now. It will work it self out as hREA is fixed.

fosterlynn commented 6 months ago

Good enough for now.