Skip to content

feat: reorder pages in user profile#309

Merged
zicklag merged 4 commits intomuni-town:mainfrom
sameoldlab:feat/reorder-pages
Feb 17, 2025
Merged

feat: reorder pages in user profile#309
zicklag merged 4 commits intomuni-town:mainfrom
sameoldlab:feat/reorder-pages

Conversation

@sameoldlab
Copy link
Contributor

@sameoldlab sameoldlab commented Feb 14, 2025

Frontend UI to reorder pages while editing user profiles
image

@sameoldlab
Copy link
Contributor Author

This is only has the frontend interaction currently. It looks like I'd need to add the pages array to editingState to make it persist? Would it be better to modify Profile or have that as a separate property @zicklag ?

@zicklag
Copy link
Collaborator

zicklag commented Feb 14, 2025

Oh, sorting pages is something I hadn't thought about yet. 🤔 They're organized like folders on your computer right now, without an explicit order.

You can probably just leave the backend side of this to me and just only show the editor for now if the PUBLIC_ENABLE_EXPERIMENTS environment variable is set to true, so that we can merge this now and then enable it later once the backend stuff is in place.

The idea will be to add a Sort component where it's value is just a number that we can use to sort the pages by, and then we'll save that info on the page entities.

@sameoldlab sameoldlab marked this pull request as ready for review February 14, 2025 17:38
@sameoldlab
Copy link
Contributor Author

Ok, added the flag and updated the PR description to avoid auto-closing #295

{/each}
</ul>
</div>
{#if editingState.editing&&import.meta.env.PUBLIC_ENABLE_EXPERIMENTS}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable should actually be accessed through the $env/dynamic/public import so that it can be configured at runtime when deployed like we do here:

import { env } from '$env/dynamic/public';

const clientId = env.PUBLIC_GH_CLIENT_ID;

@zicklag
Copy link
Collaborator

zicklag commented Feb 17, 2025

Ah, sorry I forgot to merge this.

@zicklag zicklag added this pull request to the merge queue Feb 17, 2025
Merged via the queue into muni-town:main with commit 22438ee Feb 17, 2025
1 of 2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants