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

[17.0][MIG] web_chatter_position: Migration to 17.0 #2893

Open
wants to merge 19 commits into
base: 17.0
Choose a base branch
from

Conversation

trisdoan
Copy link

@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
Sponsor

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
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
Sponsor

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
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
Sponsor

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
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
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
Sponsor

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
Sponsor

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
Author

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

@Rad0van
Copy link
Sponsor

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
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

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.