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

Re-architecture the "TaskList" entity in the backend #4267

Merged
merged 155 commits into from
Jun 4, 2024
Merged

Conversation

Atala
Copy link
Member

@Atala Atala commented May 16, 2024

Solves also #4007

Copy link
Contributor

@vladimir-8 vladimir-8 left a comment

Choose a reason for hiding this comment

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

Request changes is only due to the hook usage, all the rest are just suggestions

I guess with such amount of changes we should probably start releasing it with smaller instances; also checking if nothing breaks accidentally in the mobile app

src/Entity/TaskList.php Outdated Show resolved Hide resolved
src/Service/RouteOptimizer.php Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it TourTest now?

Copy link
Member Author

Choose a reason for hiding this comment

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

not yet

actually TaskCollection (ordered set of tasks, which has a distance and polyline) is an abstract class/base class that has now two implementations Delivery and Tours (TaskList was but not anymore).

for your information we use doctrine inheritance mapping to translate this abstraction to the database-level.

(I am not really fond of this both on the code side or database side as it adds complexity to the understanding of both the code and the codebase, but it is like this for now)

tests/AppBundle/Entity/TaskListTest.php Outdated Show resolved Hide resolved
src/Action/TaskList/SetItems.php Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion it's better to avoid such generic subscribers and have specialized classes instead, where each class has more focused set of actions/responsibilities. See Domain\Order\Reactor package, for example

const Tour = ({ tour, tourId, draggableIndex }) => {

if (!tour && tourId) {
tour = useSelector(state => selectTourById(state, tourId))
Copy link
Contributor

Choose a reason for hiding this comment

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

js/app/dashboard/redux/actions.js Show resolved Hide resolved
@Atala Atala changed the title Make Tours first class "TaskList" citizens Re-architecture the "TaskList" entity in the backend May 27, 2024
@Atala Atala merged commit 64cb828 into master Jun 4, 2024
5 of 6 checks passed
@Atala Atala deleted the revamp-tasklist branch June 4, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment