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

feat: add components to objects #825

Merged
merged 20 commits into from
Nov 21, 2024
Merged

Conversation

vjousse
Copy link
Collaborator

@vjousse vjousse commented Nov 12, 2024

🔧 Problem

We want to be able to model the component notion. See the card for more details.

🍰 Solution

Add a level above the processes with a name and a quantity.

🚨 Points to watch/comments

Currently, components are built on the file from the example file. Their uniqueness is based on their name, it should be improved later on with component ids and a file listing the possible components.

It's not possible to modify processes on purpose, it should come later on.

Tests need to be added.

🏝️ How to test

  • Go on the object tab
  • Select the "Chaise", score should be 422
  • Select the "Table", score should be 3 979
  • Add and remove some components: score should be updated accordingly
  • Expand the "Procédés" summary and check that the totals impacts and mass of the component is the impacts and mass of the process multiplied by the quantity of the component like below

image

  • Check that the bookmarks work as expected

@vjousse vjousse marked this pull request as ready for review November 18, 2024 07:32
@vjousse vjousse force-pushed the feat/object-add-components-to-json branch from eb7c63d to 06c8d2c Compare November 18, 2024 07:33
@vjousse vjousse requested a review from n1k0 November 18, 2024 15:46
@vjousse
Copy link
Collaborator Author

vjousse commented Nov 18, 2024

@n1k0 there is still some work to do, but I would to get some feedback first 🙏

@vjousse vjousse self-assigned this Nov 19, 2024
Copy link
Member

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

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

Looks good! I'd expect component UUID to be implemented in the same patch but I'll leave this up to you if you want to land this first.

src/Data/Object/Simulator.elm Outdated Show resolved Hide resolved
src/Data/Object/Query.elm Outdated Show resolved Hide resolved
src/Data/Object/Simulator.elm Show resolved Hide resolved
src/Data/Object/Simulator.elm Outdated Show resolved Hide resolved
src/Page/Object.elm Outdated Show resolved Hide resolved
src/Page/Object.elm Outdated Show resolved Hide resolved
Copy link
Member

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

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

A few more nits and remarks while I caught them

src/Page/Object.elm Outdated Show resolved Hide resolved
src/Data/Object/Simulator.elm Outdated Show resolved Hide resolved
src/Data/Object/Simulator.elm Outdated Show resolved Hide resolved
@n1k0 n1k0 force-pushed the feat/object-add-components-to-json branch from 09790d3 to a1b88c7 Compare November 20, 2024 14:59
@n1k0 n1k0 force-pushed the feat/object-add-components-to-json branch from a1b88c7 to 2f476ef Compare November 20, 2024 15:00
@n1k0 n1k0 force-pushed the feat/object-add-components-to-json branch from ef03d3e to 9c5c262 Compare November 20, 2024 15:07
@n1k0 n1k0 merged commit 464d978 into master Nov 21, 2024
6 checks passed
@n1k0 n1k0 deleted the feat/object-add-components-to-json branch November 21, 2024 10:49
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