bibledit / cloud

Source code for Bibledit core library and Cloud binary
GNU General Public License v3.0
12 stars 3 forks source link

Confusion about stylesheets. Possible small bug. #916

Closed warpok closed 9 months ago

warpok commented 9 months ago

It seems to me that the way stylesheets are working is very odd.

In the browser, I am able to edit my stylesheet. It shows properly. The line above v10 is an \s2 heading. A special heading for God speaking has made v11 to be in italics. Screenshot_2023-09-18-17-48-52-31_40deb401b9ffe8e1df2f1cc5ba480b12

In the app/program in Android, I cannot determine the stylesheet and cannot edit them. Note that the stylesheet selected in the cloud is causing v.11 to be in italics. But note also that the heading above v10 is not showing up properly. Is this a bug?

Screenshot_2023-09-18-17-50-08-68_37cd51ed9774c6d15030c769a0aa6eb7

I am able to edit styles in the Bibledit Android app, but cannot edit the stylesheet chosen in the Cloud. If I were to edit the default Stylesheet in the App, would I also be able to edit it in the Cloud? It would seem better to disable editing stylesheets in the client app, since the app is not able to select different stylesheets, etc.

I still disagree with Teus in a previous thread in this: Any translator can change the stylesheet displayed for a translation team.

Now if stylesheets in the client app were not connected to the Cloud in any way, then I would be in favor of individual translators to be able to modify their stylesheets for their client app. But right now, the client app seems to base the stylesheet on what the cloud has (except when it fails to be updated, as above).

teusbenschop commented 9 months ago

Note that the stylesheet selected in the cloud is causing v.11 to be in italics. But note also that the heading above v10 is not showing up properly. Is this a bug?

If the heading above verse 11 is in italics, and a paragraph marker like \p or similar is not placed after that heading, then the text of verse 11 takes the paragraphs style of that heading. That is how the stylesheets work. It works like any text following the last paragraph marker will take that style.

What is the raw USFM around the verse in question? That will answer the question why verse 11 is in italics, and why that special heading is not showing up in the editor.

I am able to edit styles in the Bibledit Android app, but cannot edit the stylesheet chosen in the Cloud.

Any stylesheets created in the Android app can be edited, but not the stylesheets from the Cloud. The administrator can edit any stylesheet on the Android client app.

If I were to edit the default Stylesheet in the App, would I also be able to edit it in the Cloud?

The default stylesheet is "Standard", and is never editable on any device.

It would seem better to disable editing stylesheets in the client app, since the app is not able to select different stylesheets, etc.

I just connected to the Cloud via the Android app, with a Manager role, and can set the stylesheet per Bible without any problems.

Now if stylesheets in the client app were not connected to the Cloud in any way, then I would be in favor of individual translators to be able to modify their stylesheets for their client app.

What you are in favour of is already the case. If a user creates a stylesheet in the client app, then this stylesheet is not connected to the Cloud in any way, and the user can modify their stylesheet for on the client app.

teusbenschop commented 9 months ago

This issue at https://github.com/bibledit/cloud/issues/859 has a long discussion about privileges for stylesheets.

warpok commented 9 months ago

I'm sorry for being so unclear. Please forgive. Note that in my BE Client program, I can create a new stylesheet based on the Standard stylesheet. The stylesheet I have set in the Cloud App is not Showing here, but is affecting the display of the text. Is this intentional?

Screenshot_2023-09-21-07-53-52-61_37cd51ed9774c6d15030c769a0aa6eb7

Note that in the BE Client program, in Settings > Bibles, it says that I am displaying the Standard stylesheet, BUT it is not displaying that stylesheet, because new formats that I have introduced in the Cloud stylesheet are showing up in the client program's display.

Screenshot_2023-09-21-07-54-44-82_37cd51ed9774c6d15030c769a0aa6eb7

warpok commented 9 months ago

In Isaiah, we are experimenting with using italics for God's words and normal non-italic font for Isaiah's words. I made new formats for poetry in the Cloud BE stylesheet: \iq1, \iq2, and \iq3. I also modified \s2 so that it is smaller font and right justified. It is not defined as italic.

Screenshot_2023-09-21-07-58-35-77_40deb401b9ffe8e1df2f1cc5ba480b12

Note BELOW that the \s2 section heading (TUHAN membenci ...) above v10 is incorrectly shown in the client program in italic and centered. The formats above and below the section heading are not italic, so the italic font is not inherited from the preceding format.

Screenshot_2023-09-21-07-59-58-14_37cd51ed9774c6d15030c769a0aa6eb7

warpok commented 9 months ago

Note that in the browser/cloud BE display, the stylesheet is showing properly. The s2 heading is smaller, non-italic font and right justified. Verse 11 is italic because it is \iq1 style.

Screenshot_2023-09-21-08-01-57-16_40deb401b9ffe8e1df2f1cc5ba480b12

So the bottom line is that the client BE program is inheriting the stylesheet from the cloud BE, but it is only displaying some of the formats properly. I like the client program inheriting the stylesheet from the cloud. It would be a long process for me to recreate the format in the cloud stylesheet, because there are lots of modifications.

Doesn't it seem to you that there is inconsistency here? First, if the client has no special stylesheet made in the client, it is not displaying the Standard stylesheet as it claims. (Again, I am actually happy that it doesn't display it.) In the case where no client stylesheet is defined, it would be an improvement for the program to be aware that the cloud is displaying a different stylesheet (giving its name in the Settings > Bible screen). And then, of course, it would best if it properly displayed all the styles in that cloud stylesheet. However if the client program user chooses to make a whole new stylesheet, then the user-defined stylesheet should take priority over the cloud stylesheet.

teusbenschop commented 9 months ago

Note that in my BE Client program, I can create a new stylesheet based on the Standard stylesheet. The stylesheet I have set in the Cloud App is not Showing here, but is affecting the display of the text. Is this intentional?

This is not intentional. It is weird that it is even happening because stylesheets don't get downloaded to client software.

Note that in the BE Client program, in Settings > Bibles, it says that I am displaying the Standard stylesheet, BUT it is not displaying that stylesheet, because new formats that I have introduced in the Cloud stylesheet are showing up in the client program's display.

What are the names of the new formats that were introduced in the Cloud stylesheet, and that show up in the client's display?

In Isaiah, we are experimenting with using italics for God's words and normal non-italic font for Isaiah's words. I made new formats for poetry in the Cloud BE stylesheet: \iq1, \iq2, and \iq3. I also modified \s2 so that it is smaller font and right justified. It is not defined as italic.

The styles \iq1, \iq2, and \iq3 are not new, but are available in the Standard stylesheet. The client uses those and displays the text according to the definitions of those styles in the Standard stylesheet.

To prove that, the style \iq1 is in italics in the Standard stylesheet, and so verse 11 is displayed in italics in your client program, just as this style is defined in the Standard stylesheet.

Note BELOW that the \s2 section heading (TUHAN membenci ...) above v10 is incorrectly shown in the client program in italic and centered. The formats above and below the section heading are not italic, so the italic font is not inherited from the preceding format.

This analysis is not correct. The style \s2 is defined as in italics in the Standard stylesheet, and so this heading is displayed in italics in your client program, which uses the Standard stylesheet, and so this is exactly how it should be. Also the text being entered is exactly as the style is defined in the standard Stylesheet.

Note that in the browser/cloud BE display, the stylesheet is showing properly. The s2 heading is smaller, non-italic font and right justified. Verse 11 is italic because it is \iq1 style.

Yes, this is because in the Cloud display, the \s2 style was modified as such. Hence in the Cloud the text display is according to your modified stylesheet.

So the bottom line is that the client BE program is inheriting the stylesheet from the cloud BE, but it is only displaying some of the formats properly.

This analysis is not correct. The client program uses its own stylesheet, and displays the formats exactly as defined in the selected stylesheet, which is the Standard one in your case.

I like the client program inheriting the stylesheet from the cloud. It would be a long process for me to recreate the format in the cloud stylesheet, because there are lots of modifications.

I understand that this would be nice, but unfortunately this is not currently the case in Bibledit.

Doesn't it seem to you that there is inconsistency here?

Nope, it is all consistent and predictable behaviour.

First, if the client has no special stylesheet made in the client, it is not displaying the Standard stylesheet as it claims.

It claims to display the Standard stylesheet, and so it does, correctly.

And then, of course, it would best if it properly displayed all the styles in that cloud stylesheet. However if the client program user chooses to make a whole new stylesheet, then the user-defined stylesheet should take priority over the cloud stylesheet.

Currently the client does not download the Cloud's stylesheet, so the client knows nothing about those. And if the user on the client creates a new stylesheet, and activates that for a Bible, then this new stylesheet is the one that is used to display the text.

warpok commented 9 months ago

You are certainly right. So I will make a matching stylesheet for my client app. Thanks. Sorry for my jumping to the wrong conclusions again!