Bug 147386 - Calc - Text Import from csv - 'Fields' preview is invisible
Summary: Calc - Text Import from csv - 'Fields' preview is invisible
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Windows-Dark-Mode
  Show dependency treegraph
 
Reported: 2022-02-11 21:26 UTC by Loren Amelang
Modified: 2022-11-11 17:51 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Typical view, same in any mode or display setting (35.60 KB, image/png)
2022-02-11 21:30 UTC, Loren Amelang
Details
Random csv file that shows the problem. (9.91 KB, application/vnd.ms-excel)
2022-02-12 04:37 UTC, Loren Amelang
Details
'Random csv file' in Arch Linux looks good. (207.88 KB, image/png)
2022-02-12 05:13 UTC, Loren Amelang
Details
Safe Mode plus official Dark Theme - _almost_ invisible (1.17 MB, image/png)
2022-02-12 21:55 UTC, Loren Amelang
Details
LO 7.4 Calc Import Window Bad Contrast in Dark Theme (134.07 KB, image/png)
2022-08-21 19:21 UTC, tobyps
Details
Text Import dialog (dark mode + dark color scheme) (60.94 KB, image/png)
2022-10-10 19:04 UTC, Rafael Lima
Details
Text Import dialog (patched) (62.18 KB, image/png)
2022-10-10 19:18 UTC, Rafael Lima
Details
Sample file with screenshots (281.81 KB, application/vnd.oasis.opendocument.graphics)
2022-11-10 15:01 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loren Amelang 2022-02-11 21:26:13 UTC
Description:
This has happened since I switched to Libre a couple years ago. Still happens in 7.3.0.3 (x64). My Win 10 is set to Dark theme, but changing back makes no difference. Windows Magnifier 'Invert colors' makes no difference. Yes, I've changed some Libre color settings, but none of the changes affected this view. In other Calc views, selecting a cell or its text usually makes some difference - not here. Selecting a column or row does invert its whole area, but no text ever appears. 

The import process always imports everything, usually correctly...  But if it guesses wrong there is no hope of adjusting it! 

Steps to Reproduce:
1.Open any .csv file
2.The Import preview pops up
3.No visible data

Actual Results:
No visible data

Expected Results:
Preview of data dividers


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

But lots of previous versions were affected...  

Sorry, I'm not into installing some unknown app that messes with my drivers and wants $10 per month. No idea about OpenGL.
Comment 1 Loren Amelang 2022-02-11 21:30:32 UTC
Created attachment 178231 [details]
Typical view, same in any mode or display setting
Comment 2 raal 2022-02-11 22:21:34 UTC
Please attach test .csv file. Thank you.
Comment 3 m_a_riosv 2022-02-11 23:48:29 UTC
Or test disabling Skia, Menu/Tools/LibreOffice/View
Comment 4 Loren Amelang 2022-02-12 04:37:10 UTC
Created attachment 178235 [details]
Random csv file that shows the problem.
Comment 5 Loren Amelang 2022-02-12 05:11:19 UTC
I found Tools -> Options -> View -> Graphics -> Use Skia and disabled it. Restarted, verified it is disabled. No difference. 

Tried a bunch of random csv files, all looked the same in the Import dialog. Toggling to Width mode doesn't change the view. 

Tried the Attached csv in Arch Linux, preview worked properly. But I haven't made any dark mode changes there - it just picked up the system dark theme. See screenshot. 

Headers of selected columns are colored very differently from data or unselected headers there. In Windows, entire columns and their headers are either black or white. 

My actual spreadsheet data now looks great in Windows with my dark settings. Somehow this csv Import doesn't match real data...  Is there some dev mode that lets one see which format choice is controlling which visual item?
Comment 6 Loren Amelang 2022-02-12 05:13:31 UTC
Created attachment 178236 [details]
'Random csv file' in Arch Linux looks good.
Comment 7 raal 2022-02-12 07:21:33 UTC
You can test with fresh user profile: menu Help > Restart i safe mode
Comment 8 Loren Amelang 2022-02-12 20:21:39 UTC
@raal

Somehow that safe mode shows actual data! Maybe I'd already changed color settings before I first tried csv import...  

My vision is so bad it is miserable to work with white backgrounds or a low-contrast dark mode. I spent hours of searching and experimenting to get the actual spreadsheet content into a usable pure white text on pure black dark mode. This csv import dialog is the only place where that doesn't seem to be working. I'd rather keep 99+% of my work comfortable than sacrifice that for a dialog I rarely use. 

I'll ask again...  Is there some tool that can tell you which color settings affect some particular detail of the display? Apparently the csv import dialog is set up quite differently from actual sheet content. Having to randomly experiment with dozens of mysterious color options affecting different parts of the program differently is no fun...  

I'm thankful Libre lets me turn my content high-contrast dark, I couldn't find any way to do that in Excel. Wish I could get the rest of the app as nicely dark as it is in Linux, but dark content is more important.
Comment 9 Loren Amelang 2022-02-12 21:02:40 UTC
More compulsive searching...  

https://bugs.documentfoundation.org/show_bug.cgi?id=142172
V Stuart Foote 2021-05-15 17:55:49 UTC
...
No reason we can't devise themes suitable for multiple os/DE--to optionally bypass os/DE themeing.  But what is holding LO back continues to be that not all components of the UI are exposed for control in the Application Colors panel and its .xcu configurations.  Both facets--toggle to bypass os/DE "system" theme, completing a framework for UI application colors--will need dev attention.


I guess that's what I'm encountering - some parts of the csv import dialog are affected by my mode choices, but not all of them respond like the sheet content does. I imagine this is a hassle for everyone involved!
Comment 10 Loren Amelang 2022-02-12 21:52:05 UTC
Sorry, one more...  

I went back to Safe Mode and made a single change: Tools -> Options -> LibreOffice -> Application Colors -> Color Scheme -> Libre Office Dark 

The csv preview became _almost_ invisible - see screenshot. Apparently the tweaks that get me maximum contrast in spreadsheet content eliminate that tiny bit of default contrast in the import dialog. 

Personally I'd call the untweaked screenshot version "invisible" for practical use. Maybe you could tweak the official dark theme? Or probably better, tweak the csv import dialog to use colors like the actual sheet content does? That code must already exist...
Comment 11 Loren Amelang 2022-02-12 21:55:45 UTC
Created attachment 178248 [details]
Safe Mode plus official Dark Theme - _almost_ invisible
Comment 12 tobyps 2022-08-21 19:20:21 UTC
Contrast is still a problem with the new Dark Theme on Libre Office 7.4 in the Importwindow.
Comment 13 tobyps 2022-08-21 19:21:16 UTC
Created attachment 181936 [details]
LO 7.4 Calc Import Window Bad Contrast in Dark Theme
Comment 14 Loren Amelang 2022-08-21 20:25:17 UTC
Still happening in 7.3.2.2. 

And a major frustration because of what is probably a separate bug:

I regularly import data in the same format to the same sheet. All the tries appear to show that they remember the import settings correctly, but about half the tries somehow move the division at column 19 to column 18 in the actual import result - even though the preview shows 19. I have to move the preview divider to col.20, do an import which divides at col.20, then move it back to col.19 which then works. 

This would be much easier if I could see the data, but it is so predictable I can now do it blind.
Comment 15 Rafael Lima 2022-10-10 19:04:52 UTC
Created attachment 182954 [details]
Text Import dialog (dark mode + dark color scheme)

I confirm this with the latest master LO 7.5+

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: d1707bc31261d16893c1f5240c803d283e293ec1
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded

The problem is that the dark theme (via Tools - Options - Application Colors) change the document background color, which affects the CSV import dialog.

See attached image of the dialog using kf5 (Linux).

I'm setting this to NEW.
Comment 16 Rafael Lima 2022-10-10 19:18:42 UTC
Created attachment 182955 [details]
Text Import dialog (patched)

I created a patch that tries to fix this problem.

See attached image of how it looks now.
Comment 17 Rafael Lima 2022-10-10 19:22:22 UTC Comment hidden (obsolete)
Comment 18 Rafael Lima 2022-10-10 19:23:03 UTC
Here's the patch available for review in Gerrit.

https://gerrit.libreoffice.org/c/core/+/141177
Comment 19 Commit Notification 2022-11-07 12:17:42 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

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

tdf#147386 Fix text color in CSV import dialog (dark mode)

It will be available in 7.5.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 20 m_a_riosv 2022-11-09 22:28:00 UTC
Sorry @Rafael, for me it's fine for the data, but not for the column title.
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ddb8a1a282aae74c1cee3a5e1f446abd0c00b116
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en- Calc: CL threaded
Comment 21 Rafael Lima 2022-11-10 12:48:42 UTC
(In reply to m.a.riosv from comment #20)
> Sorry @Rafael, for me it's fine for the data, but not for the column title.

Can you try again on an empty profile? Or at least reset the UI modifications?

If the problem persists, please attach a screenshot so I can try to figure out what the problem is.
Comment 22 m_a_riosv 2022-11-10 15:01:14 UTC
Created attachment 183523 [details]
Sample file with screenshots

With
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3c0be5564afe1b9cc843a49aba88b72af74c43ab
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: es-ES Calc: threaded

The title of the selected column, it's difficult to read it.
Comment 23 Rafael Lima 2022-11-11 17:51:03 UTC
(In reply to m.a.riosv from comment #22)
> The title of the selected column, it's difficult to read it.

So you think the header color should use Black when selected?