Skip to content
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

Show/Hide comment field for exchanges in the Techno/Biosphere. #708

Merged

Conversation

marc-vdm
Copy link
Member

@marc-vdm marc-vdm commented Feb 7, 2022

Fixes: requests #706, #583, #567 and #303

Adds a new checkbox in the toolbar of an activity tab:
image

Checking this box shows the Comment column after the Formula line in both the Technosphere Inputs and the Biosphere Flows tables.
image

Comment field shows existing comments and allows user to add their own text to the field. Of course, the edit activitiy checkbox should also be checked to edit comments.

Comments in the ecoinvent database are also shown. This includes 'weird' comments like EcoSpold01Location=GLO.
image

Also works as intended in combination with the Show Uncertainty option, though showing both at the same time can become quite wide in the table view.
image

The comments are stored in the Brightway exchange.comment field, and thus compatible with database import/export.

I'm aware there were more detailed plans to integrate this in a better way, but this took me less than an hour to write and I think this has substantial added value to users.

@marc-vdm marc-vdm force-pushed the activity_exchange_comment_field branch from d36ffb3 to f0d96eb Compare February 11, 2022 12:36
@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 54.072% when pulling f0d96eb on marc-vdm:activity_exchange_comment_field into d6e29cc on LCA-ActivityBrowser:master.

@bsteubing bsteubing merged commit 80a5680 into LCA-ActivityBrowser:master Feb 15, 2022
@bsteubing
Copy link
Member

@marc-vdm this is a great addition, thanks a lot! There are a couple of small issues though:

  • the row height now changes for specific rows if there are large comments (or even if these comments are not shown)
  • the width of the comment column can be extreme...

My suggestion would be to:

  • keep the regular row height when comments are OFF
  • limit the width of the comment column

Do you think you can also do that?

@marc-vdm
Copy link
Member Author

Thanks! I'd be happy to update this. Some notes:

  1. I had not seen the row height change yet, could you share a screenshot of that? (I also didn't change this, so I'm not immediately sure where this would be in the code)
  2. I agree that some comments from ecoinvent are rather lengthy. Would you rather I:
    • cut the text off at 'x' characters (I think adding tooltips with the full text would be hard to implement on a cell/row level)
    • get multiple lines of text in one comment cell?

I think the second option for 2. would be best, though this may misform the table so it becomes hard to navigate with the comments present.

@bsteubing
Copy link
Member

image

Regarding 2) I think it is best to adjust the row height and width so comments can fully be read, but to switch this back to normal row height when comments are hidden

btw I pushed some commits for renaming, so make sure to update your master as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants