Skip to content

Rename descriptionEditable to custom_description with backwards compatibility #275

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

Closed
3 tasks
wei opened this issue Apr 13, 2024 · 0 comments · Fixed by #457
Closed
3 tasks

Rename descriptionEditable to custom_description with backwards compatibility #275

wei opened this issue Apr 13, 2024 · 0 comments · Fixed by #457
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@wei
Copy link
Owner

wei commented Apr 13, 2024

  • Rename to ${key}Editable to custom_${key} to prettify url as snake_case is preferred over camelCase in urls, such that descriptionEditable to custom_description.
  • Keep backwards compatibility so existing urls with ${key}Editable will still be an alias of the new custom_${key}, and things like descriptionEditable will still function as normal.
  • (Not part of this task), for future - Instead of custom_description, Perhaps we can rename all variables to much shorter url parameters like i=1&f=1&d=1&do=Description%20Overwrite&t=Dark

descriptionEditable: string

if (currentConfig?.editable) {
const editableValue = params.get(`${key}Editable`)
if (editableValue != null) {
Object.assign(newChange, {
value: editableValue,
})
}
}

This will come handy when adding language override too (#69)

@github-project-automation github-project-automation bot moved this to To do in Socialify Aug 27, 2024
@wei wei added the good first issue Good for newcomers label Sep 7, 2024
@wei wei added the help wanted Extra attention is needed label Nov 23, 2024
@wei wei changed the title Rename descriptionEditable to description_overwrite with backwards compatibility Rename descriptionEditable to custom_description with backwards compatibility Dec 19, 2024
wei added a commit that referenced this issue Dec 19, 2024
Fixes #275

Rename `descriptionEditable` to `custom_description` with backwards compatibility.

* Rename `descriptionEditable` to `custom_description` in `common/types/queryType.ts`.
* Rename `descriptionEditable` to `custom_description` in `src/components/configuration/config.tsx`.
* Add backwards compatibility check for `descriptionEditable` in `src/components/configuration/config.tsx`.
* Rename `descriptionEditable` to `custom_description` in `common/configHelper.ts`.
* Add backwards compatibility check for `descriptionEditable` in `common/configHelper.ts`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/wei/socialify/issues/275?shareId=XXXX-XXXX-XXXX-XXXX).
wei added a commit that referenced this issue Dec 19, 2024
Fixes #275

Rename `descriptionEditable` to `custom_description` with backwards compatibility.

* Rename `descriptionEditable` to `custom_description` in `common/types/queryType.ts`.
* Rename `descriptionEditable` to `custom_description` in `src/components/configuration/config.tsx`.
* Add backwards compatibility check for `descriptionEditable` in `src/components/configuration/config.tsx`.
* Rename `descriptionEditable` to `custom_description` in `common/configHelper.ts`.
* Add backwards compatibility check for `descriptionEditable` in `common/configHelper.ts`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/wei/socialify/issues/275?shareId=XXXX-XXXX-XXXX-XXXX).
wei added a commit that referenced this issue Dec 19, 2024
Fixes #275

Rename `descriptionEditable` to `custom_description` with backwards compatibility.

* Rename `descriptionEditable` to `custom_description` in `common/types/queryType.ts`.
* Rename `descriptionEditable` to `custom_description` in `src/components/configuration/config.tsx`.
* Add backwards compatibility check for `descriptionEditable` in `src/components/configuration/config.tsx`.
* Rename `descriptionEditable` to `custom_description` in `common/configHelper.ts`.
* Add backwards compatibility check for `descriptionEditable` in `common/configHelper.ts`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/wei/socialify/issues/275?shareId=XXXX-XXXX-XXXX-XXXX).
@wei wei closed this as completed in #457 Dec 19, 2024
@wei wei closed this as completed in c7d053d Dec 19, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Socialify Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant