-
-
Notifications
You must be signed in to change notification settings - Fork 256
Refactor Javascript and related API functions #2725
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a huge amount of file changes in here. I have skimmed the 163 files (that was a slow moving scrollbar) and everything seems logical and nothing jumps out as potentially wrong.
Also nothing seemed obviously broken on a quick test install, so everything seems good to me, and if there are any issues then we should pick them up in the upcoming testing for new release.
Nicely done Adam :)
Noticed the change of case to Title Case in a lot of messages. Is that what we are standardising on? I don't mind either way, but do want to make sure we move towards consistency in these. |
I support sticking with Title Case, as I believe it looks better and more professional. I'm sure there's a ton of areas remaining to be updated for consistency though as I only updated things as I noticed it with this PR. |
84de19b
to
6f6c0eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of changes, awesome progress and cleanup, but in my quick testing I am running into issues.
The buttons on the product mange tab are slightly broken:
The update button for product configurations is staying disabled after the settings are saved.
WYSIWYG editor fields are broken and not passing the contents that were written.
In the client area, trying to create a new support ticket results in a 404. Ticket is not created. (Also I guess I had forgotten to configure the WYSIWYG editor here somehow, oops)
a3d6d56
to
a7b8f83
Compare
Remove depreciated and unused JavaScript functions, replacing with `FOSSBilling.*` functions or vanilla JS where appropriate. Co-Authored-By: Copilot <[email protected]>
Update Javascript API wrapper to use HTML `data` attributes. Also move Javascript API functionality to API wrapper.
Co-authored-by: Copilot <[email protected]>
Refactor JavaScript by removing deprecated/unused functions and centralising API functionality within the API wrapper, which now uses HTML data attributes. Additionally, unnecessary CSRF tokens have been removed, and relevant UX changes implemented where applicable.
Update (14-May-25):
data-fb-api
data attribute JSON type definition validation added and API modal options made future-proof.Docs Pending - see fossbilling.org - (following merge).