Skip to content
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

[Feature Request] Show Grid Layout in Edit/Create view #5

Open
MikeCraig418 opened this issue Apr 14, 2020 · 3 comments
Open

[Feature Request] Show Grid Layout in Edit/Create view #5

MikeCraig418 opened this issue Apr 14, 2020 · 3 comments
Assignees

Comments

@MikeCraig418
Copy link

Hello,

Thanks again for this plugin. Is it possible to retain the gridder formatting within the edit and create view?

NovaTabs did something similar to retain the tabs on the form views.

Thank you!

Best Regards,

Mike

@MikeCraig418 MikeCraig418 changed the title Show Grid Layout in Edit/Create view [Feature Request] Show Grid Layout in Edit/Create view Apr 14, 2020
@Zen0x7
Copy link
Owner

Zen0x7 commented Apr 15, 2020

Hi @949mac

I feel it might be a bit complex but I think it can be achievable, I would need help.

This repository uses a methodology that overwrites the default Vue components of nova. To support the currently package features the PanelItem and Panel views have been overwritten.

I checked the Nova source codes and I think I have a list of files that should be overwritten to support the feature you are bringing up.

I think those files, if we implement them in this repository in the same way that it was implemented in:

https://github.com/demency/nova-gridder/blob/master/resources/js/components/PanelItem.vue
https://github.com/demency/nova-gridder/blob/master/resources/js/components/Panel.vue

To clarify how this plugin works:

This plugin add meta to the field using a macro of Field class to merge extra meta attributes. (Done on NovaGridderServiceProvider)

As Panel do a "v-for" of Fields, so, a flex and flex-wrap classes must be added to panel container if the field has gridder attribute defined (Nova gridder installed) and add w-full or panelSize option to field container. i think so

As PanelItem is the per field on view component, if field implements gridder attributes, that attributes will be pushed as classes to the field name, container or w/e.

To move forward with the issue I would like to see if you could identify the lines that should be modified in the next files:

  • src/components/Forms/DefaultField.vue
  • src/components/Forms/FieldWrapper.vue
  • src/components/Forms/HelpText.vue
  • src/components/Forms/Label.vue
  • src/components/Forms/Panel.vue

I think this change would not take more than 30 lines, the complexity is in knowing what each thing does and what classes should be applied to which elements.

Help to ask some questions:
¿Which divs are the panel, label or content?
¿New meta attributes are required? or ¿Default values brokes the display?
¿New way to inject classes to components is possible, instead overwrite?

@Zen0x7 Zen0x7 added help wanted Extra attention is needed good first issue Good for newcomers labels Apr 15, 2020
@Zen0x7 Zen0x7 self-assigned this Apr 21, 2020
@Zen0x7 Zen0x7 removed good first issue Good for newcomers help wanted Extra attention is needed labels Apr 21, 2020
@Zen0x7
Copy link
Owner

Zen0x7 commented Apr 21, 2020

Probably that feature will be added on this weekend

@Zen0x7
Copy link
Owner

Zen0x7 commented Apr 28, 2020

I will delay this issue a week. I have a little idea how can i do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants