PR#2862: Configuration Table using Spreadsheet

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: PR#2862: Configuration Table using Spreadsheet

Post by jonasb »

When looking at the PR's description, this sounds pretty powerful indeed. Somewhat dangerously, but especially useful to reference user-input from a parent container. However, I find the name "hidden reference", or "HIDDENREF(..)" a bit strange. Can we still brainstorm on the name a bit before merging? What do you think about "unsafe(..)"?
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: PR#2862: Configuration Table using Spreadsheet

Post by adrianinsaval »

unsafe is too ambiguous, hiddenref is more descriptive. If we want to more actively warn users of the danger expressions that use this function could have a different coloring like orange instead of blue with a tooltip to explain why
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: PR#2862: Configuration Table using Spreadsheet

Post by jonasb »

Maybe "unchecked(..)"? that would describe more that the check for cyclic dependencies is not performed here. Personally, I find "hiddenref(..)" completely unspecific. Sure, it may make sense for the developer who implement it, but not for the user. I'd prefer a user-centric naming.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: PR#2862: Configuration Table using Spreadsheet

Post by realthunder »

There is another PR of mine improving the expression completer, which is going to address the concerns here. The completer will provide descriptions of the function just like Python console. It will also warn user about cyclic reference in red.
Screenshot from 2021-11-12 08-16-46.png
Screenshot from 2021-11-12 08-16-46.png (27.71 KiB) Viewed 8168 times
chennes wrote: Mon Nov 08, 2021 2:26 pm I'm working my way through merging this PR
I don't have problem using a new name of the function, but can we at least keep the old name for migration purpose? There are already people using my branch with this function. We can add deprecation notes in the tooltip, once the completer PR is there.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
chennes
Veteran
Posts: 3868
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: PR#2862: Configuration Table using Spreadsheet

Post by chennes »

realthunder wrote: Fri Nov 12, 2021 12:59 am can we at least keep the old name for migration purpose?
That seems reasonable. I'll merge it as it is now and you can submit a PR that is just the addition of the "legacy" name, that way it's easy to track down and remove later on.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3868
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: PR#2862: Configuration Table using Spreadsheet

Post by chennes »

jonasb wrote: Tue Nov 09, 2021 5:18 pm I'd prefer a user-centric naming.
I just wanted to say that I appreciate the feedback, and I'm not ignoring it :) -- but absent any sort of consensus on the name my inclination is to leave it as-is.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: PR#2862: Configuration Table using Spreadsheet

Post by adrianinsaval »

realthunder wrote: Fri Nov 12, 2021 12:59 am I don't have problem using a new name of the function, but can we at least keep the old name for migration purpose? There are already people using my branch with this function. We can add deprecation notes in the tooltip, once the completer PR is there.
How about some code that replaces the old name for the new one? Your release was never advertised as compatible with FreeCAD master so I don't think it's too much of an issue
BiBo
Posts: 2
Joined: Tue Nov 23, 2021 7:23 am

Re: PR#2862: Configuration Table using Spreadsheet

Post by BiBo »

Hello.
To be honest, your job made me go back to learning FreeCAD, thanks, it's incredible.
I ask experts to explain how to work with SS Edit mode/ComboBox? I feel this is an incredibly useful feature (something like LOOKUP) but can't get this set up to work.
The functionality of synchronizing SS data with SQL databases also suggests itself, maybe someone has met or did this for sale?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: PR#2862: Configuration Table using Spreadsheet

Post by realthunder »

BiBo wrote: Tue Nov 23, 2021 7:33 am I ask experts to explain how to work with SS Edit mode/ComboBox? I feel this is an incredibly useful feature (something like LOOKUP) but can't get this set up to work.
I haven't included the 'Edit mode' feature in this PR. I assume you read about in the wiki document. It's available in my branch, if you want to try. The configuration table feature in my branch will use the combo box edit mode in the spreadsheet so that you can change the configuration either in spreadsheet directly or using the configurable object property.

Here is a simple example of using the mode own your own. Just type the following expression in any cell

Code: Select all

[[<<a>>, <<b>>, <<c>>], 1]
Then right click the cell, select Edit mode -> ComboBox. Now if you edit the cell, it will show a combo box instead. If you want to always show the combobox, enable Edit mode -> Persistent.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
BiBo
Posts: 2
Joined: Tue Nov 23, 2021 7:23 am

Re: PR#2862: Configuration Table using Spreadsheet

Post by BiBo »

realthunder wrote: Sun Nov 28, 2021 9:05 am I assume you read about in the wiki document. It's available in my branch, if you want to try.
Thank you! I have no idea how you came to this, I read it several times wiki document and every time I find something new that I missed in the previous reading. It's global!
Post Reply