Opened 7 years ago
Closed 6 years ago
#41143 closed defect (bug) (fixed)
Theme/plugin editing: if you don't select a function it just returns without message
Reported by: | karmatosed | Owned by: | pento |
---|---|---|---|
Milestone: | 5.1 | Priority: | low |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Attachments (7)
Change History (34)
#1
@
7 years ago
- Summary changed from Theme/plugin editing: if you don't have a function it doesn't encourage you to have one, just fails. to Theme/plugin editing: if you don't select a function it just returns without message
This ticket was mentioned in Slack in #design by karmatosed. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by xkon. View the logs.
7 years ago
#7
@
7 years ago
Sure I could fix a version like
that @swissspidy . To clarify it will be disabled by default and then accordingly changed if there's a selection .
I'll get on it after work. Question is there a js file that loads on admin globally it would be nicer to add a function there instead of inline. I have no clue first time contributing so I don't want to add things to wrong files ..
Best regards ,
Konatantinos
#8
@
7 years ago
Hello again,
I've added 41143_v2.diff this is @swissspidy 's suggestion to have the button disabled. I think it works better than the error message. At least it makes more sense and keeps the UI clean.
Unfortunately I added the code within the page as I don't know if I should add it to the minified common.js myself or if somebody will transfer it there.
Keep me posted if you need it in another file so I can fix an update for it.
Best regards,
Konstantinos
#9
@
7 years ago
After talking with @swissspidy ( he helped me understand the dev svn correctly, so thanks again :) ) I've added the code into common.js instead to be nice and clean for production.
Added: 41143_v3.diff
Best regards,
Konstantinos
This ticket was mentioned in Slack in #core by xkon. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-themes by xkon. View the logs.
7 years ago
#12
@
7 years ago
- Milestone changed from Awaiting Review to 4.9
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#13
@
7 years ago
Just dropping by in case there's an update for this as well @karmatosed / @SergeyBiryukov , i reapplied the patch and it's still working by disabling the Look Up
button
This ticket was mentioned in Slack in #design by xkon. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#16
@
7 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 4.9 to 4.9.1
- Owner changed from SergeyBiryukov to xkon
41143_v3.diff needs to be refactored to be integrated with theme-plugin-editor.js, which is new in this release.
#18
@
7 years ago
- Keywords has-patch added; needs-patch removed
@westonruter, I've added the code into theme-plugin-editor.js
. It is working as supposed to but unfortunately I'm not that well versed to be honest and got lost a bit on how the 'refactoring' should work but at least I hope it's a start for someone to 'embed' it fully if this patch isn't viable.
If there are any pointers I'd gladly read up and re-work on it as every day is a new thing learned!
#19
@
7 years ago
41143_5.diff adds into theme-plugin-editor.js
the checks for Documentation: Lookup Button.
Looking it with a fresh and clear mind I think this is ready.
This ticket was mentioned in Slack in #design by xkon. View the logs.
7 years ago
This ticket was mentioned in Slack in #design by boemedia. View the logs.
7 years ago
#23
@
7 years ago
Instead of a method name of docsLookup
I think it would be better to have something more descriptive and “verby” like updateDocsLookUpButtonDisabledState
. I'm not sure even a separate method is needed there, actually. The toggling of the disabled
prop could be done right in the change
handler.
#24
@
7 years ago
41143_6.diff removes the new method and does the check inside the change
as @westonruter pointed out
Modified the buttons jQuery code to show / hide an error message.