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

fix: improve object simulator. #799

Merged
merged 15 commits into from
Oct 14, 2024
Merged

fix: improve object simulator. #799

merged 15 commits into from
Oct 14, 2024

Conversation

n1k0
Copy link
Member

@n1k0 n1k0 commented Oct 10, 2024

🔧 Problems

  • The simulator doesn't show masses (total and per-item)
  • The "add item" button is missing when the product items list is empty.
  • When selecting an existing example or bookmark, we'd like to fill its name in the new bookmark text input.
  • We'd also like a more meaningful query string representation than what we currently have.
  • We want to render the steps impact distribution chart in the sidebar.

🍰 Solution

Implement or fix aforementioned tasks.

🏝️ How to test

  • Check that the simulator renders total and per-item masses
  • Check that we always have an "add item" button rendered.
  • Check that an existing bookmark or example name is filled in the bookmark input text.
  • Check that suggested bookmark names are more convenient than what we have now.
  • Check that the step impacts distribution chart is rendered properly.

@n1k0 n1k0 changed the title fix: fill existing bookmark or example name. fix: improve object simulator. Oct 10, 2024
@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from 59b7cea to eb26239 Compare October 10, 2024 14:17
@n1k0 n1k0 requested a review from vjousse October 10, 2024 14:31
@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from 960ac8e to 6c901a0 Compare October 10, 2024 14:50
@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from b49b6ef to 03ee786 Compare October 14, 2024 09:48
@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from 03ee786 to a6dcfd4 Compare October 14, 2024 09:53
@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from 4f2ff8b to c307b8c Compare October 14, 2024 11:39
@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from 6bd5015 to 2c50378 Compare October 14, 2024 12:02
@n1k0
Copy link
Member Author

n1k0 commented Oct 14, 2024

@vjousse this is now ready for review.

Copy link
Collaborator

@vjousse vjousse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits but code wise it looks good to me. Just a little question: why can't we add more than 2 processes? We may allow having twice the same process?

src/Data/Object/Simulator.elm Show resolved Hide resolved
public/data/object/examples.json Show resolved Hide resolved
src/Page/Object.elm Show resolved Hide resolved
@n1k0
Copy link
Member Author

n1k0 commented Oct 14, 2024

Some nits but code wise it looks good to me. Just a little question: why can't we add more than 2 processes? We may allow having twice the same process?

@vjousse because we only have two processes available and having two distinct amounts of the same plastic would look weird I think… but that's probably some feedback we should get from POs.

@vjousse
Copy link
Collaborator

vjousse commented Oct 14, 2024

Shouldn't we display the density too to help understand the computation?

@n1k0
Copy link
Member Author

n1k0 commented Oct 14, 2024

I think it should be rendered in the explorer but here... I don't know, that would also clutter the ui. Let's wait for user feedback here.

@n1k0 n1k0 force-pushed the chore/polish-object-bookmarks branch from dd212b3 to 4b0ed3c Compare October 14, 2024 15:15
@n1k0 n1k0 merged commit 1630a27 into master Oct 14, 2024
5 of 6 checks passed
@n1k0 n1k0 deleted the chore/polish-object-bookmarks branch October 14, 2024 15:40
vjousse pushed a commit that referenced this pull request Nov 7, 2024
## [2.5.0](https://github.com/MTES-MCT/ecobalyse/compare/v2.4.0..v2.5.0)
(2024-11-06)



### 🚀 Features

- Add bookmarks for objects
([#781](#781))
- Add object explorer pages.
([#803](#803))
- Distinguish Objects from Veli.
([#813](#813))
- Display score without durability
([#815](#815))
- Textile export
([#808](#808))
- Object export
([#812](#812))

### 🪲 Bug Fixes

- Create object encrypted file for versions
([#800](#800))
- Improve object simulator.
([#799](#799))
- Fix encoded display name field.
([#820](#820))

### 🚜 Refactor

- Aggregate in python
([#794](#794))
- Turn food process category into a list
([#795](#795))
- Aggregate in python
([#807](#807))

### ⚙️ Miscellaneous Tasks

- Upgrade dependencies to their latest version, Oct. 2024.
([#801](#801))
- Add tolerance to tests comparison
([#810](#810))
- *(data)* New export
([#819](#819))

### ◀️ Revert

- "refactor: aggregate in python"
([#806](#806))

<!-- generated by git-cliff -->

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants