Bug 380742 - Factor selection popup in data editor can get out of screen
Summary: Factor selection popup in data editor can get out of screen
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 09:13 UTC by RKWard Team
Modified: 2018-11-06 18:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RKWard Team 2011-12-06 09:13:20 UTC
-- Originally posted by (AT sourceforge.net): *anonymous --

-- This ticket was imported from http://sourceforge.net/p/rkward/bugs/112 on 2017-05-30 15:26:48 +0100 --
In the data editor, if one of a data frame's variables is a factor containing many levels, editing one cell results in a very big popup menu with all factor levels filling the screen. The menu doesn't show all of the levels since there are too many of them to fit on screen, and yet one cannot go out of the menu using the mouse because there's nowhere to click. All in all, this feels badly broken. ;-\)

Having many factor levels can sound silly, but that's how R imports character variables from CSV files, so that's not an uncommon scenario.

As a short-term fix, I think the popup menu shouldn't appear if there are more than 50 or 80 levels, so that the menu keeps a reasonable size. Anyway, when there are too many choices, it's an efficient solution to select a level.

The better fix would be to provide auto-completion once the user has typed enough letters that the possible choices are under 50. But hand-editing very large factors isn't probably a common use case, so maybe that's not worth it: as long as the editor doesn't do weird things, it's OK.
Comment 1 RKWard Team 2011-12-06 09:14:23 UTC
-- Originally posted by (AT sourceforge.net): nalimilan --
Gosh, SourceForge really doesn't want to remember who I am... :-p
Comment 2 Andrew Crouthamel 2018-11-06 15:18:21 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Thomas Friedrichsmeier 2018-11-06 16:54:33 UTC
Two columns get created, automatically, now. That's still not terribly useful, but then having very many levels in a factor is simply a problem to any approach.

Test-case in case this comes up again:
 x <- data.frame (c (letters, paste0("a", letters))
 rk.edit (x)
Comment 4 Thomas Friedrichsmeier 2018-11-06 18:02:46 UTC
Closing this was a bit premature. But the commit below finally addresses the issue for real:

Git commit 1a03828b813c0fb34067b978da9ff0afe500bb5a by Thomas Friedrichsmeier.
Committed on 06/11/2018 at 17:20.
Pushed by tfry into branch 'master'.

Limit number of factor levels to show in popup.

I was a bit too fast in calling that bug fixed, but now it should be:

M  +9    -1    rkward/misc/celleditor.cpp

https://commits.kde.org/rkward/1a03828b813c0fb34067b978da9ff0afe500bb5a