Bug 160682 - HTML "page style" is not a page style - move this functionality elsewhere
Summary: HTML "page style" is not a page style - move this functionality elsewhere
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Page
  Show dependency treegraph
 
Reported: 2024-04-15 20:25 UTC by Eyal Rozenberg
Modified: 2024-04-22 09:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-04-15 20:25:14 UTC
Writer's Styles sidebar has, among its items available by default, an "HTML" entry.

It turns out that the settings of the page style are used as the Default Page Style when creating a new "HTML document" (via File > New > HTML document).

This is problematic in multiple senses:

1. In a non-HTML-document, the default list page styles should not include a style (or "pseudo-style") which is not relevant to the current document. It must only include styles which may possibly be used in the current document (and since it's the default list of items - styles which are likely to be used in the document). 

2. It is unreasonable, that the way to control the default page style in documents of a certain kind would be to open a new document of a different kind and edit one of the page styles.

3. Converse of (2.) - when editing an HTML document, we _can't_ edit the HTML page style.

4. The default page style of a document is typically taken from the default page style of its template (and there's a default template if we haven't specified one explicitly). Why should this be different for HTML documents?

5. It is currently possible for the HTML page style, with its use mentioned above, to be applied various places in non-HTML document? That's a total mess! Gives me a headache just to think about it.

6. This is inconsistent with other special kinds of documents which can be created using File > New, e.g. labels and business cards. Why should they not also get a "Labels" page style?

7. And a final side-note: HTML documents do actually have page styles:

https://developer.mozilla.org/en-US/docs/Web/CSS/@page

and page breaks:

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fragmentation

but the first six points are reason enough to get rid of this "page style".
Comment 1 Heiko Tietze 2024-04-16 08:25:23 UTC
(In reply to Eyal Rozenberg from comment #0)
> It turns out that the settings of the page style are used as the Default
> Page Style when creating a new "HTML document" (via File > New > HTML
> document).
And Writer Web blocks the customization of page styles and uses HTML for the program internal representation. I wonder if using Default PS would have an detrimental effect.
Comment 2 Cor Nouws 2024-04-16 11:56:22 UTC
Hi Eyal,
(In reply to Eyal Rozenberg from comment #0)
> Writer's Styles sidebar has, among its items available by default, an "HTML"
> entry.
> 
> It turns out that the settings of the page style are used as the Default
> Page Style when creating a new "HTML document" (via File > New > HTML
> document).
> 
> This is problematic in multiple senses:
> 
> 1. In a non-HTML-document, the default list page styles should not include a
> style (or "pseudo-style") which is not relevant to the current document.
Still it allows the user to do start a new Writer doc, and change to a HTML version.

> It
> must only include styles which may possibly be used in the current document
> (and since it's the default list of items - styles which are likely to be
> used in the document). 
(Ambiguous - but prolly more on this later)

> 2. It is unreasonable, that the way to control the default page style in
> documents of a certain kind would be to open a new document of a different
> kind and edit one of the page styles.
I don't see why that would be needed.

> 3. Converse of (2.) - when editing an HTML document, we _can't_ edit the
> HTML page style.
After starting a new HTML document, one can just edit the page style..?

> 4. The default page style of a document is typically taken from the default
> page style of its template (and there's a default template if we haven't
> specified one explicitly). Why should this be different for HTML documents?
Do not disagree to that.

> 5. It is currently possible for the HTML page style, with its use mentioned
> above, to be applied various places in non-HTML document? That's a total
> mess! Gives me a headache just to think about it.
Indeed that is not what it is meant for ;)

> 6. This is inconsistent with other special kinds of documents which can be
> created using File > New, e.g. labels and business cards. Why should they
> not also get a "Labels" page style?
Still there may be good reasons for the difference.

> 7. And a final side-note: HTML documents do actually have page styles:
> 
> https://developer.mozilla.org/en-US/docs/Web/CSS/@page
> 
> and page breaks:
> 
> https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fragmentation
> 
> but the first six points are reason enough to get rid of this "page style".
I do not object per see. What is the solution you suggest to use in stead?
Thanks,
Cor
Comment 3 Eyal Rozenberg 2024-04-16 21:01:23 UTC
(In reply to Cor Nouws from comment #2)
> Still it allows the user to do start a new Writer doc, and change to a HTML
> version.

I'm not sure I understand what you mean. How can you do this? Do you mean Web View? Well, that doesn't apply the HTML page style IIANM.

> > 3. Converse of (2.) - when editing an HTML document, we _can't_ edit the
> > HTML page style.
> After starting a new HTML document, one can just edit the page style..?

Ok, true, but only from the Format menu and not through the Styles sidebar. So, my point (3.) is a bit weak.

> I do not object per see. What is the solution you suggest to use in stead?

I think it should be "per se" 
https://www.grammar-monster.com/Latin_terms/per_se.htm

Anyway, I am not _sure_ about what the solution should be. But one option I was thinking of is for HTML documents to use their own template. When you start a regular document, you open the default Writer template. If we had a default template for HTML documents, or even simply a template named HTML (more crude, but easier to implement UI-wise) - we could take its default page style.
Comment 4 Cor Nouws 2024-04-17 10:10:25 UTC
(In reply to Eyal Rozenberg from comment #3)
> (In reply to Cor Nouws from comment #2)
> > Still it allows the user to do start a new Writer doc, and change to a HTML
> > version.
> 
> I'm not sure I understand what you mean. How can you do this? Do you mean
> Web View? Well, that doesn't apply the HTML page style IIANM.
So you don't know how to use the product, and still you claim that various page styles are nonsensical..

> > > 3. Converse of (2.) - when editing an HTML document, we _can't_ edit the
> > > HTML page style.
> > After starting a new HTML document, one can just edit the page style..?
> 
> Ok, true, but only from the Format menu and not through the Styles sidebar.
> So, my point (3.) is a bit weak.
Just invalid.

> > I do not object per see. What is the solution you suggest to use in stead?
> 
> I think it should be "per se" 
> https://www.grammar-monster.com/Latin_terms/per_se.htm
> 
> Anyway, I am not _sure_ about what the solution should be. But one option I
> was thinking of is for HTML documents to use their own template. When you
> start a regular document, you open the default Writer template. If we had a
> default template for HTML documents, or even simply a template named HTML
> (more crude, but easier to implement UI-wise) - we could take its default
> page style.
IIRC the default Writer template is hard coded (or it was); the user can set a specific template in stead.
But a template looks sensible to me.
Comment 5 Cor Nouws 2024-04-21 19:31:22 UTC
(In reply to Cor Nouws from comment #4)
> IIRC the default Writer template is hard coded (or it was); the user can set
> a specific template in stead.
> But a template looks sensible to me.
IMO this report should be set to new.
Maybe first find some support on possible implementation?