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

Minor improvments: local images and ability to edit and duplicate cards #6

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

bmarne
Copy link

@bmarne bmarne commented Oct 6, 2023

No description provided.

@indigane
Copy link
Owner

indigane commented Oct 8, 2023

Thanks for bringing these up.

Are these changes something you would want merged into the main repo, or are they something you need just for yourself in your fork?

Regardless, I'm interested in your use cases for them, if you're willing to share :)

If you want these merged into the main repo, then at least the card editing and creation/duplication needs to be put behind a setting, similar to allowCategoryEditing. I would add a allowCardEditing flag that allows both editing and duplicating.

@bmarne
Copy link
Author

bmarne commented Oct 8, 2023

First of all thank, you for this (free software) sorting card tool.

My idea was to share with you some modifications I made. You may want to merge them in your repo.

The uses cases are very common:

  • Editing cards: in the initialization phase of the card sorting, while letting users browsing the cards' label and discussing with them their meaning, it is common that users submit some labels that are more meaningful for them. With physical cards, we usually strike the old label and add a new one on the card. It is useful to understand how much our labels are meaningful.
  • Duplicate cards: in the sorting phase, it happens that users want to drag a card in several groups (more like with a tag, than with a section). After a discussion, it is common to allow the users to take a blank card, to duplicate the label on it, and then sort the same label in several groups.

I will explore how to add settings.

@indigane
Copy link
Owner

indigane commented Oct 8, 2023

Ah, thanks for the clarifications. Since duplicating cards has a different purpose than editing cards, my earlier suggestion to place them behind a single settings flag might not be a good idea. It could be that there is no card editing phase, but the host still wants to allow duplicating cards.

@indigane
Copy link
Owner

indigane commented Oct 8, 2023

If you do edit the settings, there's one piece of complexity that maybe in hindsight wasn't the best idea. The settings flags are packed into the bits of a single number.

https://github.com/indigane/cardsort/blob/main/common-scripts.js#L3-L6

const settingsFlagsEnum = {
  allowCategoryEditing: 1,
  isRandomized: 2,
};

So when adding flags, these need to be powers of 2, for example:

const settingsFlagsEnum = {
  allowCategoryEditing: 1,
  isRandomized: 2,
  allowCardEditing: 4,
  allowCardDuplication: 8,
};

@bmarne
Copy link
Author

bmarne commented Oct 9, 2023

I added two settings, I hope it is OK.

@bmarne
Copy link
Author

bmarne commented Oct 13, 2023

Some final improvements in order to show the old label when it has been edited (it also work with Export and Share). I think my work on this feature is over.

@bmarne
Copy link
Author

bmarne commented Nov 21, 2023

Hi,

Do you agree to merge this PR?

I have some other changes to propose as a PR. It would be easier to submit them once this first PR has been accepted or rejected.

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.

2 participants