Bug 132253 - CHARACTER DIALOG: Drop hyperlink from character attributes
Summary: CHARACTER DIALOG: Drop hyperlink from character attributes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Heiko Tietze
URL:
Whiteboard: target:24.8.0 inReleaseNotes:24.8 tar...
Keywords: needsDevAdvice
Depends on:
Blocks: Character-Dialog Hyperlink-Dialog
  Show dependency treegraph
 
Reported: 2020-04-19 11:32 UTC by Jan Kratochvil
Modified: 2024-10-25 15:54 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
no text selected for right mouse button (43.73 KB, image/png)
2020-04-19 11:32 UTC, Jan Kratochvil
Details
Hyperlink dialog with no "Text:" entry (43.80 KB, image/png)
2020-04-19 11:33 UTC, Jan Kratochvil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2020-04-19 11:32:34 UTC
Created attachment 159709 [details]
no text selected for right mouse button

libreoffice-writer-6.4.1.2-1.fc33.x86_64

oowriter
right-click on empty area of the page
Character->Character...
HyperLink
URL
http://www.example.com
("Text:" field remains empty)
OK

Nothing happens. Document remains unmodified. "http://www.example.com" gets lost.

There should be some warning trying to set hyperlink for no object / no text.
This makes Bug 132150 more annoying.
Comment 1 Jan Kratochvil 2020-04-19 11:33:15 UTC
Created attachment 159710 [details]
Hyperlink dialog with no "Text:" entry
Comment 2 Dieter 2020-04-19 12:08:37 UTC
Even if you insert text, this text won't be displayed in the document (same bug or another bug?)

If you insert hyperlink without text with Insert => Hyperlink the hyperlink is displayed (could also be an option for hyperlink tab of the character dialog. To be hinest, I wasn't aware of this option in character dialog (and I also don't know, if it is needed here)

cc: Design-Team for further input for a desired solution

I change status to NEW
Comment 3 Heiko Tietze 2020-04-20 10:54:27 UTC
Insert > Hyperlink: foo.com (without text) adds foo.com to the document, with text the it's inserted with the link. Tested with 6.3 on a new and blank document. What's the difference?
Comment 4 Dieter 2020-04-20 10:58:23 UTC
(In reply to Heiko Tietze from comment #3)
> Insert > Hyperlink: foo.com (without text) adds foo.com to the document,
> with text the it's inserted with the link. Tested with 6.3 on a new and
> blank document. What's the difference?

Heiko, this bug is not about the hyperlink dialog, but about hyperlink tab in character dialog. I wouldn't expect such a tab there (paragraph dialog hasn't got it).
Comment 5 Regina Henschel 2020-04-20 11:15:26 UTC
The Hyperlink tab shouldn't be there at all. The item "Character" is about applying a style to characters and a hyperlink is no style but content.

In case it has been intended to allow to set the style of a hyperlink while creating a hyperlink, that can go to the hyperlink dialog.
Comment 6 Heiko Tietze 2020-04-20 11:43:04 UTC
So we either remove the tab completely (+1 for this) or make the text field working. Meaning if you apply the formatting to some selection it contains the text but is disabled. If the field is editable and empty you have to insert some text. I would block the Ok button until this condition is met.

Jan, would you agree with removing the hyperlink tab?
Comment 7 Dieter 2020-04-20 12:02:50 UTC
(In reply to Heiko Tietze from comment #6)
> So we either remove the tab completely (+1 for this)

+1 from my side. Hperlink dialog also provides more options  (for exaple link to other documents).
Comment 8 Jan Kratochvil 2020-04-20 18:31:13 UTC
(In reply to Heiko Tietze from comment #6)
> Jan, would you agree with removing the hyperlink tab?

I was expecting to just hide/disable the Hyperlink tab in the Character dialog iff there is no text selected.

I had to discover there exists the Insert->Hyperlink possibility. Yes, it makes some sense that the hyperlink is "inserted", I was more searching how to "Format" an existing text to add a hyperlink to it.
Comment 9 Heiko Tietze 2020-04-22 10:04:43 UTC
So let's get rid of it. UI-wise we could hide the tab but I wonder what code lingers behind.
Comment 10 Heiko Tietze 2020-12-08 10:05:40 UTC
The hyperlink tab is the only way to change the appearance of links, see bug 138292. So we have to consider the two options, somehow.
Comment 11 S.Zosgornik 2020-12-08 11:15:52 UTC
It should be possible to integrate the options from the hyperlink tap inside the hyperlink dialog.

+1 to remove
Comment 12 BogdanB 2024-03-12 16:10:46 UTC
Hyperling tab still here in Character - Character.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a082762fb3f41237df6385ab27f7a75d6ff92690
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 13 Commit Notification 2024-04-24 14:13:27 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63315d601296f7c188e920f73b12260d018807d0

Resolves tdf#132253 - Remove hyperlink tab from character dialog

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Stéphane Guillou (stragu) 2024-04-24 14:35:44 UTC
Now that's done, we also need to purge the relevant documentation page.
https://help.libreoffice.org/24.8/en-US/text/shared/01/05020400.html
Comment 15 V Stuart Foote 2024-04-24 15:26:20 UTC
(In reply to Stéphane Guillou (stragu) from comment #14)
> Now that's done, we also need to purge the relevant documentation page.
> https://help.libreoffice.org/24.8/en-US/text/shared/01/05020400.html

Sure, but don't we also still need something to be added to the 'Hyperlink...' dialog for formatting or manipulating style of the link?

With tab removed from the Character dialog, some way to define/edit the 'Internet Link' and 'Visited Internet Link' *styles* being applied on insert (or conversion) with the dialog. Styles which BTW remain on the "Character Styles" of the Stylist.
Comment 16 Heiko Tietze 2024-04-24 17:45:03 UTC
(In reply to V Stuart Foote from comment #15)
> Sure, but don't we also still need something to be added to the
> 'Hyperlink...' dialog for formatting or manipulating style of the link?
You can change the CS via the Stylist. I don't think we need user-defined CS for links beyond the two standards. And Regina has good arguments in comment 5 against entwisting the two.
Comment 17 Stéphane Guillou (stragu) 2024-04-25 01:46:52 UTC
(In reply to Heiko Tietze from comment #16)
> You can change the CS via the Stylist. I don't think we need user-defined CS
> for links beyond the two standards. And Regina has good arguments in comment
> 5 against entwisting the two.
In general, I agree with simplifying. We already have too many, conflicting ways to change the look of hyperlinks (Application Colours, direct editing of corresponding character style).
The now-defunct Character dialog's Hyperlink tab allowed assigning a different character style for visited/unvisited hyperlinks _per selected text run_, which is a very niche use. If anything, it should be a feature of Paragraph Styles...

If we are OK with saying goodbye to this functionality, we'd also need to get rid of the obsolete code.

Heiko, Regina, do you know if this kind of functionality is supported in e.g. MSO? i.e., are we sure we are not removing some interoperability? Or removing some ODF-supported feature?
Comment 18 Stéphane Guillou (stragu) 2024-04-25 01:47:52 UTC
(In reply to Stéphane Guillou (stragu) from comment #17)
> If anything, it should be a feature of
> Paragraph Styles...
(hot take, really unsure about this one)
Comment 19 Heiko Tietze 2024-04-25 07:27:16 UTC
(In reply to Stéphane Guillou (stragu) from comment #17)
> The now-defunct Character dialog's Hyperlink tab allowed assigning a
> different character style for visited/unvisited hyperlinks _per selected
> text run_, which is a very niche use.
According the Styles Inspector it is DF with the attributes "Unvisited CS Name" and "Visited CS Name" bound to the CS "Internet Link" and "Visited Internet Link". 

ODF states:

19.880.2 <text:a>
The text:style-name attribute specifies a text style for an unvisited hyperlink....
The text:style-name attribute has the data type styleNameRef 18.3.32.

19.907 text:visited-style-name
The text:visited-style-name attribute specifies a style for a hyperlink that has been visited.

(Quite unclear to me; there is no "text:unvisited-style-name" neither some text:a description for visited hyperlinks)
Comment 20 Commit Notification 2024-04-25 16:24:07 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/db688bf5d40a94939f8e6ab35744c267d35b39ab

tdf#132253 Hyperlink tab in Characters is gone.
Comment 21 Commit Notification 2024-10-25 13:41:12 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f0cf85983d0b04a9889c45e26ce8fd9dc022fc89

tdf#132253 tdf#163482 Use .uno:InsertHyperlinkDlg as alias

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2024-10-25 15:54:52 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/eb72179d040e92baeb3cb02cc1aa8a327b54cbda

tdf#132253 tdf#163482 Use .uno:InsertHyperlinkDlg as alias

It will be available in 24.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.