Skip to content

Conversation

@trisdoan
Copy link
Contributor

@trisdoan trisdoan commented Jul 25, 2024

Note

Context

  • Before this change, there are 2 issues

With option side, there is duplicated chatter in Invoice module

duplicated_chatter

With option bottom, when attachment viewer exists

attachment_viewer

Result in Invoicing (also applies with Sale module)

Option Bottom

  1. With attachment viewer

bottom_with_attachment_viewer

  1. Without attachment viewer

bottom_no_attachment

Option Side

  1. Without attachment viewer

side_no_attachment

@Rad0van
Copy link

Rad0van commented Jul 25, 2024

This does not feel right. When chatter is at bottom, it is always visible and takes part of the screen and leaves small portion for form itself. It should be attached at the end instead.
image

@tva-subteno-it
Copy link

May I ask you why you created a new PR? Was it only because the other dev was not responding anymore? Because I tried your PR, and this is what it looks like when I choose "Sided" in a sale order.
image

I found that the previous PR was working just fine, so I don't know what where the problems that made you change its code.

@trisdoan
Copy link
Contributor Author

May I ask you why you created a new PR? Was it only because the other dev was not responding anymore? Because I tried your PR, and this is what it looks like when I choose "Sided" in a sale order. image

I found that the previous PR was working just fine, so I don't know what where the problems that made you change its code.

Hi, I explained the reason in the description of the PR.

iirc, it works fine in Sales, let me take a look.

@Rad0van
Copy link

Rad0van commented Jul 29, 2024

@trisdoan, but that is not the way we work here in OCA. You could supersede PR if it is clearly abandoned for long period of time or the author of the original PR approves it. The original author hasn't answered for for few weeks but as can be seen has done some activity in June so not the former case nor the latter.

Also the superseding PR should be at least as good functionally as the superseded one but preferably better which unfortunately is not the case with your PR.

Contributions are highly welcome and valued. In this case it would be best to help finish the existing PR.

@trisdoan
Copy link
Contributor Author

May I ask you why you created a new PR? Was it only because the other dev was not responding anymore? Because I tried your PR, and this is what it looks like when I choose "Sided" in a sale order. image

I found that the previous PR was working just fine, so I don't know what where the problems that made you change its code.

Hello @tva-subteno-it, I just checked, I works fine on my side
Result:
web_chatter_position_2

web_chatter_position

Could you please share again (nicer if you provide video), but this time please open devtools (right click -> inspect -> console)

@Rad0van
Copy link

Rad0van commented Jul 30, 2024

May I ask you why you created a new PR? Was it only because the other dev was not responding anymore? Because I tried your PR, and this is what it looks like when I choose "Sided" in a sale order. image
I found that the previous PR was working just fine, so I don't know what where the problems that made you change its code.

Hello @tva-subteno-it, I just checked, I works fine on my side Result: web_chatter_position_2

web_chatter_position

Could you please share again (nicer if you provide video), but this time please open devtools (right click -> inspect -> console)

Have you checked all the other options? I have posted a screenshot with "Bottom" selected. It's broken.

@trisdoan
Copy link
Contributor Author

This does not feel right. When chatter is at bottom, it is always visible and takes part of the screen and leaves small portion for form itself. It should be attached at the end instead. image

Hello @Rad0van, thanks for your review.

I just checked, my improve commit made the module behave like it does in version 16.

web_chatter.mp4

@tva-subteno-it
Copy link

@trisdoan I know why it wasn't working on my side: my screen was just a bit shorter than required to display correctly. If I move my window to a bigger screen, then the chatter appears correctly on the the right side.
So maybe you could look into it, in order to display it in a nicer way when the screen is too small than juste centering it at the bottom.

Comment on lines 43 to 44
isInFormSheetBg: "false",
isChatterAside: "true",

Choose a reason for hiding this comment

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

This change set conditionally the values in order to display correctly the chatter on the bottom when the screen is too narrow to display it on the side.

Suggested change
isInFormSheetBg: "false",
isChatterAside: "true",
isInFormSheetBg: `__comp__.uiService.size < ${SIZES.XXL}`,
isChatterAside: `__comp__.uiService.size >= ${SIZES.XXL}`,

isChatterAside: "true",
});
setAttributes(chatterContainerHookXml, {
"t-attf-class": "o-aside",

Choose a reason for hiding this comment

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

This change set conditionally the values in order to display correctly the chatter on the bottom when the screen is too narrow to display it on the side.

Suggested change
"t-attf-class": "o-aside",
"t-attf-class": `{{ __comp__.uiService.size >= ${SIZES.XXL} ? "o-aside" : "" }}`,

@tva-subteno-it
Copy link

Hi @trisdoan, what do you think about the changes I suggested?

@trisdoan trisdoan force-pushed the 17.0-imp-web_chatter_position branch from 3e7e6f8 to 4cc57c7 Compare August 5, 2024 01:47
@trisdoan
Copy link
Contributor Author

trisdoan commented Aug 5, 2024

Hi @trisdoan, what do you think about the changes I suggested?

Hello, it looks good to me, thanks

@Rad0van
Copy link

Rad0van commented Aug 5, 2024

Still the same result for bottom:
image

For forms that are tall this gets even worse:
image

@tva-subteno-it
Copy link

@Rad0van are you sure you have the latest version of this PR? On my side I have no problems and it seems that from the start of this PR you are the only one with this bug.

@Rad0van
Copy link

Rad0van commented Aug 15, 2024

@Rad0van are you sure you have the latest version of this PR? On my side I have no problems and it seems that from the start of this PR you are the only one with this bug.

I may have used the other PR's contents previously but I mage sure this time I chose the right one. For me everything works except for bottom. In that case the chatter is at bottom but is fixed - takes part of the screen and the main form just scrolls behind it. In 16 it was behaving differently (I no longer can see your video to compare). Here's a screenshot:
image

The same thing in 16:
image

However when in responsive mode and the chatter gets to botton it works as expected.

@tva-subteno-it
Copy link

@Rad0van I know why it's not working on your side: it's because of the web_responsive module. Please try the web_chatter_position without any additional module. If there are some incompatibilities between modules, I think the best way to handle them is to create issues directly on the concerned module. It means that for the moment web_chatter_position works fine on its own.

@trisdoan
Copy link
Contributor Author

Thank you so much for taking care of it @tva-subteno-it

@Rad0van
Copy link

Rad0van commented Aug 16, 2024

@Rad0van I know why it's not working on your side: it's because of the web_responsive module. Please try the web_chatter_position without any additional module. If there are some incompatibilities between modules, I think the best way to handle them is to create issues directly on the concerned module. It means that for the moment web_chatter_position works fine on its own.

You're right. Without web_responsive it works. Hopefully @trisdoan can make it work together. In 16 there is no issue when both are installed so I hope it can be solved.

@tva-subteno-it
Copy link

I found where the problem was: a new CSS rule was added in the web_responsive module setting the overflow of the form sheet to auto instead of being unset. So we need to unset it manually in the web_chatter_position module.
Please @trisdoan, can you try creating the file form_statusbar.scss inside the scss folder, and adding the following:

.o_xxl_form_view .o_form_sheet_bg .o_form_sheet {
    overflow: unset !important;
}

It should fix the problem.

@tva-subteno-it
Copy link

@trisdoan Can you please add it?

@trisdoan trisdoan force-pushed the 17.0-imp-web_chatter_position branch from b2bb6c8 to c630e41 Compare August 29, 2024 02:32
@trisdoan
Copy link
Contributor Author

Hello @tva-subteno-it, it's done, nice work, thank you

@tva-subteno-it
Copy link

Perfect, I think now this PR is ready for review

Copy link

@DorianMAG DorianMAG left a comment

Choose a reason for hiding this comment

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

Tested in runboat,
functional test ok.
LGTM
Thx for this work

@trisdoan trisdoan force-pushed the 17.0-imp-web_chatter_position branch from c630e41 to afe9506 Compare October 14, 2024 02:42
Copy link

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

Functional review, thnx!

@fa-odoo
Copy link

fa-odoo commented Nov 20, 2024

hello, is it possible to use the button as on version 16.0 instead of the configuration on user preferences?

Copy link

@houssine78 houssine78 left a comment

Choose a reason for hiding this comment

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

LGTM

@trisdoan trisdoan force-pushed the 17.0-imp-web_chatter_position branch from afe9506 to 263b4d3 Compare December 4, 2024 07:18
@trisdoan
Copy link
Contributor Author

trisdoan commented Dec 4, 2024

Hello @yajo, I can reserve some time for this module when needed

Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

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

I've tested it on runboat seems the behaviour of Sided is the same as Responsive.
In 16.0 (runboat) the chatter remains sided even on xs screens:
image

in 17.0 (runboat) it moves to the bottom (the same as Responsive):
image

- Juan Miguel Sánchez Arce \<<juan.sanchez@camptocamp.com>\>
- [Camptocamp](https://www.camptocamp.com)
- Iván Todorovich \<<ivan.todorovich@camptocamp.com>\>
- Tris Doan \<<tridm@trobz.com>\>
Copy link
Member

@tarteo tarteo Dec 4, 2024

Choose a reason for hiding this comment

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

Do you work for camptocamp, if not please move this up or down

@bealdav
Copy link
Member

bealdav commented Dec 10, 2024

@tva-subteno-it as said here #2893 (comment) could we have your final review ?

@yajo yajo requested a review from tva-subteno-it December 11, 2024 08:56
@tva-subteno-it
Copy link

@tarteo the problem you're referencing comes from this suggestion. You can read the previous messages to understand the problem I had, the result that was displayed on narrow screen and the solution I came up with.

@tva-subteno-it
Copy link

@bealdav well, everything lgtm except that if @trisdoan is not affiliated to Camptocamp he should change the copyrights

@trisdoan trisdoan force-pushed the 17.0-imp-web_chatter_position branch from 263b4d3 to 0203102 Compare December 11, 2024 09:46
@trisdoan trisdoan requested a review from tarteo December 11, 2024 09:46
Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

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

Alright, I think generally for people that installed web_responsive they use it to put the chatter at the bottom anyways.

@trisdoan Can you squash commits please

[IMP] web_chatter_position: improve function compile

web_chatter_position: propose myself as maintainer
@trisdoan trisdoan force-pushed the 17.0-imp-web_chatter_position branch from 0203102 to a03e8e0 Compare December 11, 2024 11:13
@trisdoan trisdoan requested a review from tarteo December 11, 2024 11:14
@tarteo
Copy link
Member

tarteo commented Dec 11, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-2893-by-tarteo-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit bcc8da1 into OCA:17.0 Dec 11, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at f6d3d64. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.