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

Fix Contact slug generator script or find a better solution #773

Open
brylie opened this issue Jul 13, 2023 · 3 comments
Open

Fix Contact slug generator script or find a better solution #773

brylie opened this issue Jul 13, 2023 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest Issues selected for Hacktoberfest help wanted Extra attention is needed

Comments

@brylie
Copy link
Member

brylie commented Jul 13, 2023

We generate a slug for Contacts in the Wagtail Admin UI by using a custom script. However, the script is currently broken and is somewhat brittle. Fix the script and/or find a more resilient solution.

@brylie brylie self-assigned this Jul 13, 2023
@brylie brylie added the bug Something isn't working label Jul 13, 2023
@brylie brylie added this to the Minimum-viable launch milestone Jul 13, 2023
@brylie
Copy link
Member Author

brylie commented Jul 14, 2023

The code seems to be working today, perhaps it was a transient bug. However, here are some ideas for improvement:

  • only run the code when editing a person, not on other Wagtail edit forms
  • add error handling
  • consider removing unicode characters by default (research whether to allow unicode in URL slugs as a best practice)
  • consider using const for slug_text in the generateAutoslug function
  • unit test the code (both via the Wagtail Admin UI and as generic tests)

@brylie
Copy link
Member Author

brylie commented Jul 25, 2023

I tried again to set the PersonModelAdmin.form_view_extra_js bug got no JS response from Wagtail Admin. I'm not sure what might be the cause, and got no response on StackOverflow:

https://stackoverflow.com/questions/76687506/unable-to-load-custom-js-via-wagtail-modeladmin-form-view-extra-js

@brylie
Copy link
Member Author

brylie commented Jul 28, 2023

Moving this to post-launch since I've repeatedly tried to get it to load only on the Person form page.

@brylie brylie removed their assignment Sep 20, 2023
@brylie brylie moved this to Todo in WesternFriend.org Nov 15, 2023
@brylie brylie added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest Issues selected for Hacktoberfest labels Dec 13, 2023
@brylie brylie self-assigned this Apr 10, 2024
@brylie brylie removed their assignment Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest Issues selected for Hacktoberfest help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

1 participant