-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: $designer.id based URL #4242
Conversation
@cwhitten Chris where do you think we should append the setting option to? Or make it an extension? |
@lei9444 Leilei could you help checking if there is any missed case about the |
Can you clarify this a bit for me? I'm not sure what you are asking. |
@cwhitten let me rephrase that. If we use $designer id URL in PVA meanwhile keep the array index URL in Composer, then we need an URL option to control which URL format to activate. So where do you suggest we put this URL option at? I think it could be:
|
Is there a way we support both format at the same time? |
@boydc2014 @yeze322 when we discussed last, we considered a routing layer that will transform an id-based url into an array based url and supporting both |
The tricky problem here is it's a bi-directional transformation. By supporting both of them, only one format will be activated at last.
|
So I think that it's necessary to use a config to define which format is by default. And at the same time, we can have a solution that inferring current URL format on Composer loaded and then stores it as a global state. This state will instruct which format to use when generating new URL from new resource location. |
Hmm. Seems like we would want to avoid this if we can. What if we changed the routing to only support id-based urls? How would we structure this if we didn't have the array-based constraint? The more I think about array-based urls and what one expects of a url, it seems less correct. The simple scenario I get tripped up with is: If I save a deep-link to my clipboard, and someone re-orders the element in the array, the index now points to an incorrect resource The benefits of array-based don't seem to outweigh this seemingly fundamental problem. |
@cwhitten That's a reasonable and important scenario. We actually have no strong dependency with the array based URL, I agree with you. To achieve that, all changes required is just as this draft PR's changes. |
Can we revisit the query string also? If we don’t support array-based, there is no need for [ or ] in the values |
Note: The call we made at today's platform sync is keep this PR scoped to transforming the url from index based to id based, and without changing the basic pattern how url is composed. |
418a5bf
to
9995394
Compare
* mark out contribution points * impl designer path encoder/decoder * use double quotation * apply encoder / decoder to navigation logic * fix tslint error * fix import order * remove comments * fix tslint error * encode breadcrumb path Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Description
closes #4170
triggers[0].actions[1]
->triggers['475044'].actions['485963']
Task Item
Screenshots