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: open edit file popup from file widget #1301
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1301 +/- ##
==========================================
+ Coverage 72.54% 73.25% +0.70%
==========================================
Files 73 73
Lines 3311 3320 +9
Branches 538 540 +2
==========================================
+ Hits 2402 2432 +30
+ Misses 742 717 -25
- Partials 167 171 +4
|
…t overriding django's file
This sounds really useful. I'll install this & give it a go 👍 |
@marksweb @fabien-michel Is there any update on this? Found this PR recently and I have a use case for this so would love to get it into a release! |
@Will-Hoey I don't think I ever had time to install this. It's the kind of thing I may be able to squeeze in later, but my Internet is down today. So 🤞 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Ping ! |
a pity that such useful things just get lost |
The PR is now in sync with master and with small fix for latest djangocms |
I put it on our sprint list for tomorrow and Friday. |
@fabien-michel Can you also quickly look at the small flake8 issues? Thanks! |
Is anything else need to be done ? (sorry I'm not use to contribute) |
Will look later today! |
OK, my PR was missing compiled CSS. Sorry for the inconvenience, should be ok now. |
I need help to make the |
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.
Hi @fabien-michel ! What a very nice PR! Thank you so much!
I've added two comments:
- When no file is selected the button "Chose file" shows an icon with an image. For consistency, would that be the icon to show on the button to replace the file?
- I still have the styling problem. Maybe the space for the icons is too smal?
- As an additional thought: I never got the idea of opening the image or file by clicking on the icon. Maybe it is worth considering that clicking the icon should also trigger the "replace-file" popup? What's your opinion on that.
Finally, do not worry about the js linting. I've got a PR coming up that updates the gulp build process to node 16. I will resolve this issue then.
Since the test coverage is rather mediocre in this repo, adding a test that checks if the file widget provides the right URL would also be a great. |
I would propose a magnifier icon for searching/replacing a file, and the pencil to open the file's change view in the popup. |
🤔 I thought I had fixed this |
I can't reproduce. Can you double-check ? May be its a cache issue ? |
My guess is that the problem is related to an update of django, djangocms or djangocms_admin_style. (so we have a different version) But I can't find where the 15px margin-left you see on .related-lookup is coming from. Any idea ? |
👌 Thanks for your time on this PR |
Description
Add an edit button to file widget which open the edit file popup.
There is a UI change the
pencil
button now open the edit file popup. The existing lookup button now has afile
icon.Related resources
Checklist
master
Slack to find a “pr review buddy” who is going to review my pull request.