frederikheld / usm.io

A lightweight solution to represent your backlog as a User Story Map and integrate backlog management into your development workflow by maintaining it in your repository side-by-side with your code.
MIT License
6 stars 1 forks source link

Deep Links to cards #10

Open cmarqu opened 5 years ago

cmarqu commented 5 years ago

It would be nice if the URL would change (e.g. with an additional #mycard) when I have a card shown so that I can send this URL around and have people see what I see.

frederikheld commented 5 years ago

Ah, very good idea. So you could point someone to a specific card?

frederikheld commented 5 years ago

This would require that each card has an unique identifier. Right now, cards only have identifiers if you specify a package and then the renderer expects an actual package in the inputDir.

I don't want to force users to add ID's to every card manually. So it has to be done automatically, maybe with the option to set it manually. But without redundant information. So either "id" or "package".

So I could do it like this:

Do you think this is a feasible way?

cmarqu commented 5 years ago

Yes, that sounds like it would work (without knowing any details about the code).

It would be nice if the generated ID was fairly resilient to changes, so that small typofixes would still produce the same ID - something like "take the first 20 words of content, remove punctuation and stopwords, take the first 5 words of the result and join them with '-'". But this ID has the potential not to be unique, a problem a long-enough hash wouldn't have. Hmm....

frederikheld commented 5 years ago

It should be derived from the information that is already there. If we use an entirely random hash, where store it? It could be generated from the title, description or other data from the card.

But then I would prefer the human readable form: Use title, strip special chars, make lower-case, replace blanks with hyphens. If this ID already exists, add a running number, separated by a hyphen as well.

Either way, if we generate it from the information that is already there, the ID will change if this information is changed. Therefore I think title would be the best option, as this is used as reference if you tell people what to look into. And if there's a reason to change the title, the contents most probably have changed as well. So you could call it a different card and then it would actually make sense to change the ID of it.

I see your point with the typo fixes though :-P I'll think about it.

cmarqu commented 5 years ago

Transforming the title is good, and typofixes there should be rare, so no nuisance.

frederikheld commented 5 years ago

Some more thoughts on that:

I guess it should not be allowed to use the same title multiple times.

Imagine two cards with the same title. As long as each of them stays in their Step, you can distinguish them from each others. But usm.io encourages to move cards around and as soon as you put them in different steps, you don't know which is which anymore.

For the deep links feature this would lead to the technical problem, that the running number will most probably be added following the order of the cards in usm.json. If you move them around, the order might change and with it the deep-link will switch between cards :-P

I guess the technical issue could be solved somehow, but it would still be confusing for the user to allow the same title more than once.

frederikheld commented 5 years ago

BTW: Deep links to the cards' contents is already possible ;-) They're websites.

Deep links to open cards in the map would be nice though. It would also help with taking usage statistics.

cmarqu commented 5 years ago

Deep links to open cards in the map would be nice though.

That's what I mean, I just mixed up the terms :)