Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite - columns resizing #777

Closed
scriptebob opened this issue Apr 28, 2022 · 32 comments
Closed

SQLite - columns resizing #777

scriptebob opened this issue Apr 28, 2022 · 32 comments

Comments

@scriptebob
Copy link

This just seemed to have started in the build before V2022.32. I'll be viewing the data in a table, maybe make a change and Apply. And, suddenly, every single column resizes to show only one or two characters. Then, I have to go and resize every column in order to see what the name of the column is and the data in it.

@jmadren
Copy link

jmadren commented May 10, 2022

Is this in SQLPro for SQLite? I've noticed this lately also. For me, it only happens if a filter is set on the table. Does it when I change/apply in the data view or by using a query. Either forces a refresh on the Data tab, which seems to be what triggers it.

Another new behaivior that's irritating, and possibly related, is these refreshes seem to occur three times in quick succession (grid disappears and reappears three times).

@hankinsoft
Copy link
Owner

Would it be possible to get a video of what your seeing?

@jmadren
Copy link

jmadren commented May 17, 2022

Well, turns out the disappear/reappear only hapens twice, not three times, but it's still irritating. And after watching/pausing the videos, I can see the the "flash" of the table before it disappears again is showing the "reset" version of the column widths. And when a filter is set, it doesn't "restore" the saved column sizes, whereas in the non-filter scenario it does.

The first video shows setting a filter then editing a cell and applying. Note the column widths before and after. Also note that it clears/removes the filter on apply - another thing I forgot to mention. The second video shows editing without a filter set.

I had to use Dropbox because they were too big to attach:
https://www.dropbox.com/s/o1pl83z9tzxpzu7/Data%20editing%20-%20with%20filter.mp4?dl=1
https://www.dropbox.com/s/u7pwf8rd4cm2g3s/Data%20editing%20-%20no%20filter%20.mp4?dl=1

@jmadren
Copy link

jmadren commented May 17, 2022

Also, the table does not remember/restore the sort order after applying a data edit.

@jmadren
Copy link

jmadren commented Jun 6, 2022

Were you able to view the videos? Any progress on this issue?

@hankinsoft
Copy link
Owner

Shoot no, I miss that. Thanks for the video's I'm investigating now.

@hankinsoft
Copy link
Owner

Fixed. Getting it submitted to Apple and Setapp now.

@hankinsoft
Copy link
Owner

Oh shoot, Apple developer endpoint is down due to the WWDC. I can't post a new build until its available. Should be able to get it posted later today or early tomorrow.

@hankinsoft
Copy link
Owner

Setapp version is now available. App Store connect is in review so should be available soon. Website version is up at https://sqlprostudio.s3.us-east-1.amazonaws.com/sqlite/SQLProSQLite.2022.40.app.zip.

@jmadren
Copy link

jmadren commented Jun 7, 2022

Got the new version. Works great when editing data on a filtered table. But the issue still occurs when you set a filtered table, then switch to Query tab and execute a query that modifies that table. When you switch back to the table, the filter has been cleared and the column widths have been reset, just like the issue above. I mentioned this in my first comment above, but can see how it was missed.

Also, another issue that I'm not sure is related to this, or maybe related to installing an app update. I had various sql statements in the Query tab of this database. Those statements are restored whenever I open the database. But today, after updating the app, I was testing the above issue by editing data on a filtered table, and when I switched to the Query tab, all the saved sql statments were gone and only a "generated" update statement was there that matched the data edit I had just performed from the table view. I've seen this happen before, and it could be related to when I installed an app update, but can't say for sure.

@hankinsoft
Copy link
Owner

Also, another issue that I'm not sure is related to this, or maybe related to installing an app update. I had various sql statements in the Query tab of this database. Those statements are restored whenever I open the database. But today, after updating the app, I was testing the above issue by editing data on a filtered table, and when I switched to the Query tab, all the saved sql statments were gone and only a "generated" update statement was there that matched the data edit I had just performed from the table view. I've seen this happen before, and it could be related to when I installed an app update, but can't say for sure.

If you switch build type (App Store, Website, Setapp) that will happen. Each only remembers its own last query.

Got the new version. Works great when editing data on a filtered table. But the issue still occurs when you set a filtered table, then switch to Query tab and execute a query that modifies that table. When you switch back to the table, the filter has been cleared and the column widths have been reset, just like the issue above. I mentioned this in my first comment above, but can see how it was missed.

Investigating now.

@jmadren
Copy link

jmadren commented Jun 7, 2022

If you switch build type (App Store, Website, Setapp) that will happen.

I didn't switch, just allowed SetApp to update it.

@hankinsoft
Copy link
Owner

I didn't switch, just allowed SetApp to update it.

k. I'll dig into that further as well.

@hankinsoft
Copy link
Owner

hankinsoft commented Jun 8, 2022

Another build submitted which should resolve the filters being reset when running alter query. I also made a change to how queries are stored - this first time it will forget your previous query, but after that it will store properly.

@jmadren
Copy link

jmadren commented Jun 9, 2022

The new version does preserve the filter when updating the table from a query, but it does not preserve the column sizes.

@hankinsoft
Copy link
Owner

Hmmm, I'm not able to reproduce the column behaviour:

CleanShot 2022-06-09 at 14 38 29

If possible, could I get a video again with what you're seeing? It might point in at what we are doing differently.

@jmadren
Copy link

jmadren commented Jun 9, 2022

In your video you're changing the structure, not data. Here's a video where I update existing data in a table.

Oh, and just to make sure I have the lastest version, it says Version 2022.41 (Build 4270)

ScreenShot.2022-06-09.at.14.21.13.2.mp4

.

@hankinsoft hankinsoft changed the title Column Sizes SQLite - columns resizing Jun 13, 2022
@hankinsoft
Copy link
Owner

Would you be able to try this build: https://sqlprostudio.s3.us-east-1.amazonaws.com/sqlite/SQLProSQLite.2022.42.app.zip (rather than me have every setapp user update)?

I still wasn't able to reproduce, but I re-wrote part of the column sizing code along with added logging for when its resizing. So if you reproduce again, can you also please post the log file? (Found via 'View' -> 'Logs').

@jmadren
Copy link

jmadren commented Jun 13, 2022

Would you be able to try this build: https://sqlprostudio.s3.us-east-1.amazonaws.com/sqlite/SQLProSQLite.2022.42.app.zip (rather than me have every setapp user update)?

I still wasn't able to reproduce, but I re-wrote part of the column sizing code along with added logging for when its resizing. So if you reproduce again, can you also please post the log file? (Found via 'View' -> 'Logs').

Still does it for me. Log attached.

com.hankinsoft.osx.sqliteprofessional 2022-06-13--15-45-46-112.log

@hankinsoft
Copy link
Owner

Can you try https://sqlprostudio.s3.us-east-1.amazonaws.com/sqlite/SQLProSQLite.2022.43.app.zip if you get the chance? Again, if it does not keep the column sizes, please post the log file.

@jmadren
Copy link

jmadren commented Jun 14, 2022

Still the same. Log attached.
com.hankinsoft.osx.sqliteprofessional 2022-06-13--15-45-46-112.log

@hankinsoft
Copy link
Owner

I haven't had any luck with this as I've been unable to reproduce and unable to figure out anything while looking at the code. I currently and not sure when I will have this sorted completely.

@jmadren
Copy link

jmadren commented Jul 6, 2022

You're not able to reproduce it? So should I delete all files/settings associated with SQLPro for SQLite and try installing fresh?

@hankinsoft
Copy link
Owner

I've made some additional changes with the column resizing. If you get the chance, could you see if you are still seeing this?

@jmadren
Copy link

jmadren commented Dec 1, 2022

I've made some additional changes with the column resizing. If you get the chance, could you see if you are still seeing this?

It is now keeping the column widths, but it still "loses" the filter settings, though the filter is still in effect. It just doesn't show the criteria that the filter is actually using. You can see this in the video I posted before - note the filter settings before and after the query is run. But the table remains filtered. Same thing happens if you select a different table then go back to the first - the filter fields are reset but the filter remains in effect.

And, it also still resets the sort order to none (which I also mentioned before and can be seen in the video). I think all of this is interconnected to how you're refreshing the table view after a query modifies data in the table.

I'm not bothered by the sort order reset, and the filter issue, while annoying or confusing at times, is not critical. You have fixed the crucial issue for me, which was the column widths. So thanks!

@hankinsoft
Copy link
Owner

Can you check the latest version and see if the filter disappearing issue is sorted?

@jmadren
Copy link

jmadren commented Dec 6, 2022

Ok, so using the same db/scenario as the video, the filter is now staying. But the sort order is still reset.

Using another db, filtering with a ">" some value on an integer column, then running a query that updates this integer column causes it to crash when returning to the Data tab. Partial crash report attached.

It also crashes on the first db if I filter with a ">" on an integer column, then update a string column in a query. So the crash does not appear to involve updating the column that's being filtered on, but just that the filter is using ">" on an integer column. Didn't try any other combinations as I don't have time. Note that the first scenario above, where it works, is filtering on a string column with "is not null", then updating that same column in the query.

One final observation: I hadn't noticed this before, but the filter function does not alter the row count shown at the bottom of the window.

SQLPro for SQLite crash.txt

Edit: also attached log file.

com.hankinsoft.osx.sqliteprofessional-setapp 2022-12-06--15-03-41-654.log

@hankinsoft
Copy link
Owner

The first two issues should be sorted in the latest build (crash and sorting).

@jmadren
Copy link

jmadren commented Dec 8, 2022

The first two issues should be sorted in the latest build (crash and sorting).

Confirmed.

@hankinsoft
Copy link
Owner

Latest version now updates the record label when filtering.

Screenshot 2022-12-13 at 8 28 52 AM

@jmadren
Copy link

jmadren commented Dec 13, 2022

Works great! Even updates when a query changes which rows match the filter. But found one issue - if you dismiss the filter (Done or even Clear then Done), then run a query or switch tables, when you come back to that table the filter field reappears, with no criteria and no rows shown. The only way to get the filter to stay "off" is to close/reopen the db.

@hankinsoft
Copy link
Owner

The latest setapp build should have this all sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants