Skip to content

Conversation

@web-mi
Copy link

@web-mi web-mi commented Mar 30, 2021

strapi_resize

What does it do?

  • Cleanup content-manager (DraggedField to flex without absolute positioning, duplicated css, Tooltip.js not used/working anymore)
  • Added resize function to edit view fields except dynamiczones and components (minSize: 2, maxSize: 12)

Why is it needed?

Using 50% of the remaining space for a single dropdown or radio button makes editing complicated because much space is wasted.

How to test it?

Edit view of any component. A new button is shown at the end of the fields. By dragging the element the field could be resized to any size between 2/12 and 12/12. 2/12 instead of 1/12 because 1/12 is to small for description and buttons. Maybe someone has an idea how to handle too small elements.

Related issue(s)/PR(s)

Issues: #8094, #8950
Strapi Community Discussion:
https://forum.strapi.io/t/change-width-of-fields-on-edit-page/181
https://forum.strapi.io/t/columns-in-content-manager-detail-view/1011/2

…tioning, duplicated css, Tooltip.js not used/working anymore)

- Added resize function to edit view fields except dynamiczones and components (minSize: 2, maxSize: 12)
@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #9898 (dc5c126) into master (7271c1a) will decrease coverage by 8.73%.
The diff coverage is 0.00%.

❗ Current head dc5c126 differs from pull request most recent head ba777f6. Consider uploading reports for the commit ba777f6 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9898      +/-   ##
==========================================
- Coverage   35.90%   27.16%   -8.74%     
==========================================
  Files        1342     1203     -139     
  Lines       14812    10326    -4486     
  Branches     1477      562     -915     
==========================================
- Hits         5318     2805    -2513     
+ Misses       8575     7031    -1544     
+ Partials      919      490     -429     
Flag Coverage Δ
front 27.16% <0.00%> (-0.10%) ⬇️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...r/admin/src/components/DraggedField/GrabWrapper.js 0.00% <0.00%> (ø)
...r/admin/src/components/DraggedField/NameWrapper.js 0.00% <ø> (ø)
...admin/src/components/DraggedField/RemoveWrapper.js 0.00% <0.00%> (ø)
...admin/src/components/DraggedField/ResizeWrapper.js 0.00% <0.00%> (ø)
...er/admin/src/components/DraggedField/SubWrapper.js 0.00% <0.00%> (ø)
...nager/admin/src/components/DraggedField/Wrapper.js 0.00% <0.00%> (ø)
...manager/admin/src/components/DraggedField/index.js 0.00% <0.00%> (ø)
...omponents/DraggedField/utils/getBackgroundColor.js 0.00% <0.00%> (ø)
...rc/components/DraggedField/utils/getBorderColor.js 0.00% <0.00%> (ø)
...dmin/src/components/DraggedField/utils/getColor.js 0.00% <0.00%> (ø)
... and 152 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7271c1a...ba777f6. Read the comment docs.

@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/columns-in-content-manager-detail-view/1011/12

@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/change-width-of-fields-on-edit-page/181/4

@soupette soupette added the flag: don't merge This PR should not be merged at the moment label Mar 31, 2021
@sirdavidoflee
Copy link

Any movement on this? This would be a great feature to have in the CMS and would be especially helpful for Content Managers in my organization.

@soupette soupette requested a review from sam-pires April 28, 2021 07:58
@timosnel
Copy link

We would also be helped greatly if this feature gets released.

@web-mi
Copy link
Author

web-mi commented Apr 29, 2021

I'm currently using it withing /extensions directory but one single file is not overrideable and that is the one which will reset all resized fields on "yarn build".
So don't resize all fields because its only unitl your next release / build! ;-)
PR_9898.zip

@timosnel
Copy link

@web-mi the settings being reset after server restart is a deal breaker. Currently we apply a SQL migration that contains the JSON for the edit view, but it is pointless because it gets reset after a restart...

@web-mi
Copy link
Author

web-mi commented Apr 29, 2021

Yes. Thats because its better to get the review done. Then the reset problem should be gone. ;-)

@alexandrebodin alexandrebodin added the issue: feature request Issue suggesting a new feature label May 11, 2021
@ImTheCodeFarmer
Copy link

+1

@Messa1
Copy link

Messa1 commented Jul 13, 2021

What is status of this pr? Would be a awesome feature for strapi.

@aminta
Copy link

aminta commented Jul 15, 2021

  • 1

@sam-pires
Copy link

Hello,

Thanks @web-mi for the PR and everyone else for the interest 🙂

We really like this feature and the possibilities it introduces to customize the view. Though, for the moment we have to wait a bit before fully evaluating the possibility to merge it. And we probably won't be able to merge it as it is. And that for 2 main reasons:

  • We are currently working on the v4 and the new Design System implementation. As part of this work, we are working on the Content Manager on both the List and Edit views and making some technical and layout changes. So first we'll need to finish that to see how the PR works with it and how we (you and us) can adapt it.
  • Before being able to accept a feature such as this one, we'll have to work a bit on the specs in order to make sure we manage well all the edge cases and that the way it is implemented in the PR in fully compatible with the User Experience we want to offer 🙂

We totally want to add more flexibility and customization possibilities in the Edit view, it's in our plans and this PR is a good starting point, but we'll have to work on it together. So let's wait until the end of the Quarter, once the v4 and the Design System are released, and see how to make it work 🙂

@sam-pires
Copy link

And I feel questions on the v4 coming haha 😄 so here's some info:

  • There will be an Alpha release in August, followed by a Beta.
  • Until then, what I can tell regarding the Edit view is that we'll change the layout a little bit to make it easier to manage and display the Relations and at the same time to start making more room for plugins...

@derrickmehaffy
Copy link
Member

Hi 👋
We now have released the v4. As of now, the v3 is in maintenance mode for 6 months. We will only be fixing critical and security issues on v3 from now on.
I will go ahead and close this PR. Thank you for contributing to Strapi 🔥


PS I would really love to see this refactored for the v4. This PR is awesome if we could add it.

@marianhlavac
Copy link

I was actually kind of hoping that v4 will have this functionality already included.

At this point, is the author (@web-mi) willing to refactor this for v4, or should someone else take over?

@derrickmehaffy
Copy link
Member

I was actually kind of hoping that v4 will have this functionality already included.

At this point, is the author (@web-mi) willing to refactor this for v4, or should someone else take over?

If anyone else wants to take over there is no reason to hold out for the original author unless they speak up.

@web-mi
Copy link
Author

web-mi commented Dec 20, 2021

Hi together,
i made this pr and another (#9865) for a client where i need these features because editing was a mess on huge pages.
And because its open source i made the changes on my own bill and published everything.
Long time i didn't get any reply or a reply that v4 will be released.
Then both pr get closed after 9 months and as i read these features are still missing.
Currently i got no time to build and test everything again and currently no need for it anymore.
If someone will take over the idea and code is still here but unfortunately i'm out sorry. ;-)

@derrickmehaffy
Copy link
Member

Hi together, i made this pr and another (#9865) for a client where i need these features because editing was a mess on huge pages. And because its open source i made the changes on my own bill and published everything. Long time i didn't get any reply or a reply that v4 will be released. Then both pr get closed after 9 months and as i read these features are still missing. Currently i got no time to build and test everything again and currently no need for it anymore. If someone will take over the idea and code is still here but unfortunately i'm out sorry. ;-)

I'm sorry to hear that and I know we certainly did not do the best we could on getting this and #9865 looked at in a reasonable amount of time and I'll be sharing that feedback with the team to hopefully not let this happen again in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flag: don't merge This PR should not be merged at the moment issue: feature request Issue suggesting a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.