Skip to content

Dialog for editing conditional formats #1815

Closed

Description

@mgrojo

Describe the new feature

A new dialog for editing conditional formats. The dialog should
allow adding and removing conditional formats, changing the priority order
and editing foreground colour, background colour and filter condition.

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

To pull request #1503.

Does this feature exist in another product or project? Please provide a link.

It's similar to the functionality found in some Spreadsheets.

Do you have a screenshot? Please add screenshots to help explain your idea.

imagen

Activity

  1. self-assigned this
    on Mar 23, 2019
  2. mgrojo commented on Mar 23, 2019

    @mgrojo
    MemberAuthor

    I've implemented this in 217563f and I open this issue so anyone interested can test and provide feedback or suggestions.

    @SilvioGrosso you might be interested in this.

  3. chrisjlocke commented on Apr 8, 2019

    @chrisjlocke
    Member

    Just a suggestion. Would it be worth swopping the buttons around, so that 'add' and 'remove' is the 'priority' (ie, first thing you see).

    It might also be worth having a quick explanation of what the form is doing. It makes the form more 'inviting' and friendly. Just my opinion though.

    The dialog currently allows you to set no conditions - so you can click 'Add' 3 times, then click 'OK'. It doesn't break the program, but it doesn't serve any purpose.

    Initially I would have thought the conditions would be in the order you had them, rather than the top taking precedence? Again, that's why I added the 'description' to the top of the form. It would be good if we could have a 'Help' button that linked to the wiki.

    There also appears to be the hex code for the colour in the cell contents?

    This seems uneditable, nor visible. Does it need to be there?
    Would you need a 'Clear' button? If you've a lot of entries, it can be a pain to remove them all one by one. Maybe its not something you'd do often though. Just a thought.

    Looks a handy feature though. Well implemented.

  4. mgrojo commented on Apr 9, 2019

    @mgrojo
    MemberAuthor

    Just a suggestion. Would it be worth swopping the buttons around, so that 'add' and 'remove' is the 'priority' (ie, first thing you see).

    Not sure, but I don't mind changing it. Aren't the important buttons always at the right hand side (at least the submit buttons are always there)? If we change this dialog, we should also change a similar one located in Preferences > DB file extensions: Manage.

    It might also be worth having a quick explanation of what the form is doing. It makes the form more 'inviting' and friendly. Just my opinion though.

    I totally agree with this. But the text should talk about the foreground (text colour) as well as the background.

    The dialog currently allows you to set no conditions - so you can click 'Add' 3 times, then click 'OK'. It doesn't break the program, but it doesn't serve any purpose.

    Yes, something has to be changed, but I'm hesitating between not allowing it or changing the effect to: empty condition means apply to all cells, in the same way that an empty filter line shows every row. This would allow to give format to a column unconditionally. Someone might find a use for it.

    Another case that is useless is repeating the same condition. Only the first one would be in fact applicable, but don't know if we should reject the input in those cases.

    Initially I would have thought the conditions would be in the order you had them, rather than the top taking precedence? Again, that's why I added the 'description' to the top of the form. It would be good if we could have a 'Help' button that linked to the wiki.

    Yes, we could start doing that. We currently only have contextual help in the form of what's this. Each one has its merits:

    • What's this pros: can be consulted without Internet connection. It's bound to a particular version. It can be translated easily. Context sensitive.
    • What's this cons: overwhelming for starting a translation (too many texts). Cannot be improved outside of the version. My impression is that users usually ignore it: either they find very cumbersome to consult each help one by one, or they only expect little useful texts.
    • Wiki pros: can be improved easily by users, even after the version has been published. Text can be more didactic and more easily read.
    • Wiki cons: they aren't usually translated (are there projects with wiki content in several languages?). It requires Internet connection. They aren't bound to a particular version; either they need version tagging for every feature or the user might end up thinking something should be in a version and it isn't.

    Which should be our way?

    There also appears to be the hex code for the colour in the cell contents?

    This seems uneditable, nor visible. Does it need to be there?

    This is inspired by Preferences > SQL and in fact, it is used as the data container for the colour. I suppose it can be done in another way (for example, the plot works different). In part, I used that approach, because when the cell is selected in my environment, the style's selection colour eclipses the chosen colour. At least the text provides some clue (although an almost unreadable one...). Might be worth of a rethink.

    Would you need a 'Clear' button? If you've a lot of entries, it can be a pain to remove them all one by one. Maybe its not something you'd do often though. Just a thought.

    There is already one outside, in the filter box. But it would also make sense here. It would be easily done using a standard button in the footer. Would Reset be clear enough?

    Looks a handy feature though. Well implemented.

    Glad you like it.

  5. chrisjlocke commented on Apr 10, 2019

    @chrisjlocke
    Member

    The other dialog with 'Add', 'Remove' and the 'move up' and 'move down' buttons is the dialog for modify table.

    As you say, if you're going to keep the buttons on the right, this should be amended also to keep the dialogs consistent.

    They aren't bound to a particular version

    This should always reflect the latest version - users shouldn't be using out of date software! ;) I still shudder to think we support XP! ;)

  6. mgrojo commented on Apr 10, 2019

    @mgrojo
    MemberAuthor

    The other dialog with 'Add', 'Remove' and the 'move up' and 'move down' buttons is the dialog for modify table.

    As you say, if you're going to keep the buttons on the right, this should be amended also to keep the dialogs consistent.

    Ouch, good argument for rearranging the new one and not the most veteran.

    They aren't bound to a particular version

    This should always reflect the latest version - users shouldn't be using out of date software! ;) I still shudder to think we support XP! ;)

    Well, but what about the nightlies. "What's this" is aligned with the moving version, but if the wiki only reflects the latest release, then you have to update everything at once when a new version is released. The other option is adding references to a future release still not existent.

    There should be a tool that creates a document with a mock screenshot of each window (like Qt's Linguist does) and adds globes with the "what's this" texts for all the widgets. That could be a good reference help that could bbe scanned easier that the interactive "what's this". I searched for that tool but didn't find any.

  7. chrisjlocke commented on Apr 11, 2019

    @chrisjlocke
    Member

    There should be a tool that creates a document with a mock screenshot of each window

    Was looking into this at work, as I'm developing an application that requires tooltips on the buttons/controls, so need something printed out so the tooltips can be consistent across the forms.
    My initial crappy idea was to take screenshots of the tooltips and add them as layers in something like Paint.NET so they could be overlayed in one image, but depending on the complexity of the form, some tooltips will overlap others. Grr.

    Aren't the important buttons always at the right hand side

    At the top of controls (like the 'Modify table' dialog) I find the flow is usually left to right - things like 'Refresh', 'Add', 'Remove' tend to be on the left. At the bottom of the form, the 'OK' and 'Cancel' tend to be on the right. Even this GitHub form has the 'close issue' and 'comment' on the right.
    I tend to use Windows software a lot, so that always looks 'consistent' - other software like on Linux and MacOS can be more 'creative' and different.

    The other thing I notice, which I've been told off at work for, is the 'up' 'down' 'add' and 'remove' doesn't specify what you're moving up, down, adding or removing. Note on the modify table dialog, it says 'add field', 'remove field', 'move field up', etc. I do this also - 'add', 'remove' and don't specify the noun. Again, guess we should add them for consistency.

  8. mgrojo commented on Apr 13, 2019

    @mgrojo
    MemberAuthor

    I've made some improvements in the dialog:

    • Empty condition means: apply format to any row.
    • Rearranged dialog upper buttons so it resembles the Edit Table Dialog.
    • Added Help button: link to wiki page.
    • Added Reset button: clear all conditional formats in the dialog.
    • Fixed some glitches in the move commands: open editors were sometimes
      closed; using currentIndex and selectedItems caused inconsistencies.
    • Select colour with a single click and show it in the tooltip.
    • Remove the unneeded colour name in the colour cells.
  9. mgrojo commented on Aug 10, 2019

    @mgrojo
    MemberAuthor

    @chrisjlocke, can we close this or have you any other comment or suggestion?

  10. MKleusberg commented on Feb 12, 2020

    @MKleusberg
    Member

    I'm closing in preparation for the next release. Very nice work, @mgrojo 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions