[IMP] website: improve we-urlpicker URL preview button wording

Quick feedback from client, this is following [1] that added a button
next to the URL input of `we-urlpicket` to be able to preview the link.

The wording was not great, it gives the impression it's an option to
chose to have that URL opened in new tab (eg when form is submitted).

Also, giving it the style of a conventional we-button was also giving
the same impression that it was actually an option that you could click
on to enable something.

Changing the wording and the style of those special we-button should
reduce the confusion.

Arguably, one might think about the usefulness of this button but it
acts as the counterpart of the regular links which have a "Open in new
tab" possibility when hovering the link in their preview tooltip.

[1]: https://github.com/odoo/odoo/commit/acdf3cf7f5aebd803ffa1507e81ed8801727a03a

opw-3060966

closes odoo/odoo#106538

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Romain Derie
2022-11-28 14:51:21 +01:00
parent 7f257a2025
commit 2fdd998a9a
@@ -54,11 +54,11 @@ const UrlPickerUserValueWidget = InputUserValueWidget.extend({
await this._super(...arguments);
const linkButton = document.createElement('we-button');
const icon = document.createElement('i');
icon.classList.add('fa', 'fa-fw', 'fa-external-link')
linkButton.classList.add('o_we_redirect_to');
linkButton.title = _t("Redirect to URL in a new tab");
icon.classList.add('fa', 'fa-fw', 'fa-external-link');
linkButton.classList.add('o_we_redirect_to', 'o_we_link', 'ms-1');
linkButton.title = _t("Preview this URL in a new tab");
linkButton.appendChild(icon);
this.containerEl.appendChild(linkButton);
this.containerEl.after(linkButton);
this.el.classList.add('o_we_large');
this.inputEl.classList.add('text-start');
const options = {