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

feat: link a post directly to its respective GitHub edit page #102

Merged
merged 5 commits into from
Feb 6, 2021
Merged

feat: link a post directly to its respective GitHub edit page #102

merged 5 commits into from
Feb 6, 2021

Conversation

almndbtr
Copy link
Contributor

@almndbtr almndbtr commented Feb 5, 2021

Summary

Closes #103.

Hallo, Aarchiver frens! 👋

After consulting the Develop this wiki page, I wanted to contribute a new feature: automatically linking posts directly to their GitHub edit page. 🔗 ✨

I know the original request calls for a button, but I opted for a plain link––happy to get any design feedback from the team. 🧑‍🎨

Consulted resources

Motion pictures

Desktop (Safari)

desktop-motion-preview

Mobile (Chrome, mocking an iPhone X)

mobile-motion-preview

@vercel
Copy link

vercel bot commented Feb 5, 2021

@almndbtr is attempting to deploy a commit to the Bullionix Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/bullionix/aavegotchi-wiki/h48tr3juy
✅ Preview: https://aavegotchi-wiki-git-fork-almndbtr-almndbtr-edit-on-github.bullionix.vercel.app

@cinnabarhorse
Copy link
Member

This is really great! The only issue I see is that for localized pages (where lang is other than en we're not translating it directly in Github, but rather using Crowdin. So maybe you could only show the button if the lang = en?

@almndbtr
Copy link
Contributor Author

almndbtr commented Feb 5, 2021

The only issue I see is that for localized pages (where lang is other than en we're not translating it directly in Github, but rather using Crowdin. So maybe you could only show the button if the lang = en?

😯 ! Good catch––I'll include that and follow up once that's included. 👍

Kudos to @cinnabarhorse for bringing this up in #102 (comment).

For localized pages (lanaguages that are not `en`), the Wiki leverages Crowdin rather than directly translating them on GitHub. This change shows the `✏️ Edit this page` button only for pages written in English (checking `router.query.lang` is equal to `en`).
@almndbtr
Copy link
Contributor Author

almndbtr commented Feb 5, 2021

@cinnabarhorse - I've added the language check in 410cedf, following the conditional convention that the contributor container implements. Let me know if you prefer that conditional written differently.

I'm wondering––how do users switch languages today? While one could modify the URL and replace it with their preferred language, there doesn't seem to be a button for changing it right from the site. 💭

Let me know if I'm missing something super obvious for language switching! But, if there isn't a way to do that, I can open an issue for tracking as separate work from this PR. ✌️

@almndbtr
Copy link
Contributor Author

almndbtr commented Feb 5, 2021

Checking the deploy preview at root, the ✏️ Edit this page link doesn't currently show up. I'll look into why that might be 👀

Copy link
Member

@cinnabarhorse cinnabarhorse left a comment

Choose a reason for hiding this comment

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

Looks good!

@cinnabarhorse
Copy link
Member

Great job @almndbtr. Feel free to HMU on telegram (@coderdannn) or Discord

@cinnabarhorse
Copy link
Member

languages

Yes that's been something on the list of to-dos but we haven't gotten around to it yet. If you'd like to open an issue and do some work on it that would be super neat!

@almndbtr
Copy link
Contributor Author

Thanks for merging my pull request, @cinnabarhorse !

If you'd like to open an issue and do some work on it that would be super neat!

Opened #110. I won't hop on it just yet to leave space for the community to jump in, if anyone is interested! ✌️

@almndbtr almndbtr deleted the almndbtr/edit-on-github branch February 11, 2021 01:54
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.

Add "Edit this page" button
2 participants