unoplatform / Uno.Gallery

The Uno Platform Gallery application
https://platform.uno/
Other
150 stars 41 forks source link

Add fragment or args redirect to samples page #1054

Closed rafael-rosa-knowcode closed 6 months ago

rafael-rosa-knowcode commented 7 months ago

GitHub Issue (If applicable):

From Uno issue https://github.com/unoplatform/uno/issues/14746

The idea of this PR is that it is possible to access the Samples using a direct link. For example, pass the address https://gallery.platform.uno/#combobox and get directly to the ComboBox samples page.

image

This other PR will update the Docs to redirect to a specific sample. https://github.com/unoplatform/uno/pull/14833

image

PR Type

What kind of change does this PR introduce?

What is the current behavior?

For now we don't have any redirection that allows you to access a sample directly.

What is the new behavior?

This PR implements a redirection that allows you to access a sample directly. Using URL address for Wasm (e.g https://gallery.platform.uno/#ComboBox) and command line parameters for GTK.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

This issue is related to the Add link for Gallery and Playground on Docs Reference

Internal Issue (If applicable):

Include Reference Link to the Playground and Gallery in each Control Documentation https://github.com/unoplatform/uno/issues/14746

github-actions[bot] commented 7 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

rafael-rosa-knowcode commented 7 months ago

To validate using the link on the PR publish.

https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net/#ComboBox

And check the change on the code. image

Or you can try to do passing parameter on the GTK

image

The most of the other changes are about parameter to methods or Javascript to the window.location.hash. (Already used in the playground.)

https://github.com/unoplatform/Uno.Playground/blob/ba525f1e11c7188d6bc8f4810bbfcb0246b87759/src/Uno.Playground.WASM/ts/FragmentNavigation.ts#L4

github-actions[bot] commented 7 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

github-actions[bot] commented 7 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

github-actions[bot] commented 6 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

github-actions[bot] commented 6 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

rafael-rosa-knowcode commented 6 months ago

@jeromelaban Isn't this change something interesting or something we want? Because it could make it easier for users. And we have already implemented the links in the documentation, this part would be missing. Can you review again?

jeromelaban commented 6 months ago

@rafael-rosa-knowcode I can't this PR to work with the staging site, even with the #combobox fragment. Could you take a look?

And to answer your question, yes, it's a very useful feature.

github-actions[bot] commented 6 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

github-actions[bot] commented 6 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net

rafael-rosa-knowcode commented 6 months ago

@jeromelaban About

I can't this PR to work with the staging site, even with the #combobox fragment. Could you take a look?

I updated it to allow capitalized text or not, (InvariantCultureIgnoreCase)

This was working. (ComboBox) https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net/#ComboBox

And now this will work too. (combobox) https://white-field-08c5cf00f-1054.eastus2.3.azurestaticapps.net/#combobox

jeromelaban commented 6 months ago

This is working very nicely! Thanks!