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

New Edit -> Duplicate action with shortcut #672

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

mgesteiro
Copy link
Contributor

@mgesteiro mgesteiro commented Feb 2, 2023

Added new Duplicate feature: instead of copy-pasting all the time (that a lot of us usually and constantly do), it is easier, faster and common practice now (FreeCAD, Fritzing, Inkscape, etc. etc. already have this function) just to duplicate.

This function doesn't modify the clipboard, that is useful (and common practice) also.

This PR also contains a lot of typo corrections and some cosmetic.

@mgesteiro mgesteiro changed the title New Edit -> uplicate action with shortcut New Edit -> Duplicate action with shortcut Feb 2, 2023
@cavearr cavearr merged commit 9096e8f into FPGAwars:develop Feb 2, 2023
@cavearr
Copy link
Member

cavearr commented Feb 2, 2023

Thanks again!

@mgesteiro
Copy link
Contributor Author

Wellcome!

PS: I was editing the previous comment, you were... fast!

@mgesteiro mgesteiro deleted the edit-duplicate branch February 2, 2023 11:27
@cavearr
Copy link
Member

cavearr commented Feb 2, 2023

Grateful for your collaboration! I am changing a large part of the engine and all these usability things that you are adding improve a lot on a day-to-day basis and I don't have time to invest time, thank you very much.

@Obijuan
Copy link
Member

Obijuan commented Feb 2, 2023

Hi @mgesteiro! Thanks a lot for you contributions!
This new duplicate action is really helpful! I wanted to implement it for so long, but did not find the time. So, thank you very very much 🙂️
Currently I am working on the collections (There is a lot of work to do). I am defining the interfaces, initial implementations and documenting it on the wiki

@cavearr
Copy link
Member

cavearr commented Feb 2, 2023

Let's go team!!

@jojo535275
Copy link
Contributor

Hello guys,

First, thanks mgestereiro for you new features!
For info, in case you don't know we are also discussing about icestudio (improvements and use... ) on this dedicated [google group!] (https://groups.google.com/g/fpga-wars-explorando-el-lado-libre)

have a nice day.

@mgesteiro
Copy link
Contributor Author

mgesteiro commented Feb 3, 2023

Thanks a lot for you contributions!

Welcome, just following your example 👌

This new duplicate action is really helpful!

I was thinking about doing something similar with the "clone" feature: changing it from the actual "paste & clone" to just "clone selected". I say this because I had to dig deep down to find out what the "clone" function was and how it worked: very counter-intuitive (and strangely documented only in the "Changelog").

Let me know what do you think (all of you!)

@jojo535275
Copy link
Contributor

I agree with you the cloning-is quite counter-intuitive !
I started re-thinking thinking about that "complex" subject one year ago ! see this thread ( Maybe starting from my post of 22 January 2022.). but we never went further!

@cavearr
Copy link
Member

cavearr commented Feb 3, 2023

This feature is very interesting in work on it, if you want we could talking about it in the previous thread initiated by @jojo535275 in fpgawars list or here.

@mgesteiro
Copy link
Contributor Author

I agree with you the cloning-is quite counter-intuitive ! I started re-thinking thinking about that "complex" subject one year ago ! see this thread ( Maybe starting from my post of 22 January 2022.). but we never went further!

I've read the thread now (diagonally) and yes, it's not a simple task to rework the "editing process". My experience using Icestudio is still very limited and I'm not ready yet to dive into this discussion. The features I've implemented are obvious/trivial, but maybe that is how far I can go for now.

@mgesteiro
Copy link
Contributor Author

This feature is very interesting in work on it, if you want we could talking about it

Let me explain what happened to me so I can provide some perspective/context:

  1. new (advanced) user coming for the first time to icestudio, playing around, trying to figure-out how this works (let's put aside the installation process, OSX always is special)
  2. because of a failing Del keyboard event trap (I still don't know what happened here) and no menu-action equivalent, I'm unable to delete blocks (doubting myself as it makes no sense): "I must be doing or assuming something wrong here...".
  3. eventually (by accident), I discover that I can overwrite blocks moving one over the other: "this must be it, how I'm supposed to... replace blocks?"
  4. "ok, I want now to duplicate this block: no Duplicate menu (strange), but maybe this Clone is just a synonym... NOP, but what is it doing then?!?"
  5. "let's search the wiki, the documentation, the forum, the whole Internet! using the term Clone ... nothing...", to finally discover some mention in the History/Changelog wiki page with a very nice video (no text) covering the topic: "I see... no duplicate then 🤦🏽‍♂️"
  6. "oh, if I click and drag A BLOCK, the block is NOT selected, I have to click again IN the block, or use a selection box..."

What was most confusing for me with the Clone action is the fact that it is -in reality- a modified Paste action, and that this is never stated/said anywhere: right away I would change the menu to be Paste cloning instead, to make this obvious, and provide also some specific entry in the Wiki home-page where the info could be more easily found (specially being Clone such a big deal). This situation was reinforced by the fact mentioned in the point 4. (I was looking for Duplicate and found Clone) and, in general, by the poor initial UX (2. 3. and 6.).

Now that we have both Delete and Duplicate, maybe it doesn't make sense anymore to update the Clone action, but this would be my proposal on how to change it:

  • Instead of being a modified Paste, it would be a modified Duplicate, i.e., no need to previously copy anything, just Copy what you have selected right now: this is more intuitive (IMHO) because cloning resembles to us like copying something (instead of duplicating it from memory).
  • After the action is invoqued, being it such an specific behaviour with such implications, I'll show a dialog stating/explaing exactly that (with a check box to never show again, for advanced users).

Does this proposal make any sense to you? Let me know!

@jojo535275
Copy link
Contributor

jojo535275 commented Feb 3, 2023

Few comments on your points:

2 - i am on windows and my "Del" key always worked for deleting a selected part of the circuit !?!

3 - right you can replace blocks that way without having to reconnect everything (if the new block as about the same in-out pins config )

4 - Reading your last paragraph, you may have understood. But to duplicate a block you have two option:
a) copy - paste: create a copy automatically synced (in term of later changes/modifications inside the block). So a change inside one of the two block is "echoed"/ pass on into the other cope (same if more than two copies exist)
b) copy- clone: Here the copies are not anymore linked/(changes synced) after the clone creation ! it is useful to make a variation of a block. Personally i do not like at all the use of clone here. i would prefer the word "Variant" ( like for our beloved Covid-19 friend with all is different tastes :-) )

6- yes, click and drag, moves the block but doesn't select it when the mouse button is released, i never felt it as a problem but this could be changed easily i suppose!
The question is ! Do we really need that function? Is there any drawback/unwanted effect ? what do you think guys?

For me, in the end, "copy" , "paste" should remain because people are used to "ctrl+C, ctrl+V" workflow for one or a selected part of the circuit (more than one block) and in all of our other computer applications. Than we can add :

  • a "Duplicate" ( which is a copy + paste)
  • a "Create Variant" ( copy + clone ) that you are calling"modified duplicate" ( this function should be grayed out when more than a single block is selected).
    And it will be nice to have all this functions available trough the edit menu, keyboard shortcuts and also trough a right click on the mouse button!

@mgesteiro
Copy link
Contributor Author

2 - i am on windows and my "Del" key always worked for deleting a selected part of the circuit !?!

It started to work at some point... I don't know how or what happened (and believe me that I tried hard to reproduce the problem again... 🤷🏽‍♂️)

3 - right you can replace blocks that way without having to reconnect everything (if the new block as about the same in-out pins config )

yes, and it's a nice feature. I was just telling my steps to show how my bad experience came from a misfortune accumlation of little devilish details

4 - Reading your last paragraph, you may have understood. But to duplicate a block you have two option: a) copy - paste: create a copy automatically synced (in term of later changes/modifications inside the block). So a change inside one of the two block is "echoed"/ pass on into the other cope (same if more than two copies exist) b) copy- clone: Here the copies are not anymore linked/(changes synced) after the clone creation ! it is useful to make a variation of a block. Personally i do not like at all the use of clone here. i would prefer the word "Variant" ( like for our beloved Covid-19 friend with all is different tastes :-) )

yes, I understand perfectly (now) how it works but, believe me, it was easier -in the early stages- to read the code!

copy & paste are two actions + a clipboard update: with duplicate (that is what we do most of the time, at least I do), you save 50% of your actions + clipboard is not altered (convenient in my work-flow as I tend to use it to stash things)

Variant sound nice, but not much of a difference ...

6- yes, click and drag, moves the block but doesn't select it when the mouse button is released, i never felt it as a problem but this could be changed easily i suppose! The question is ! Do we really need that function? Is there any drawback/unwanted effect ? what do you think guys?

I think it's ok too! Just had to get used to it (like sooooo many other idiosyncrasies in a lot of other software). Again: those 6 steps are just to explain how my frustration build up.

For me, in the end, "copy" , "paste" should remain because people are used to "ctrl+C, ctrl+V" workflow for one or a selected part of the circuit (more than one block) and in all of our other computer applications.

agree.

Than we can add :

* a "Duplicate" ( which is a copy + paste)

It's already done (I implemented it two PR's ago 😅)

* a "Create Variant" ( copy + clone ) that you are calling"modified duplicate" ( this function should be grayed out when more than a single block is selected).

ok, you didn't knew the full-picture here... this is a follow-up conversation

  And it will be nice to have all this functions available trough the edit menu, keyboard shortcuts and also trough a right click on the mouse button!

agree about the right click... room there for so many things (basic or default collection **cough**) 😁

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

Successfully merging this pull request may close these issues.

None yet

4 participants