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

Make previewChips use the grid system as well #173

Merged
merged 2 commits into from
Jun 14, 2020

Conversation

anthonyraymond
Copy link
Contributor

@anthonyraymond anthonyraymond commented May 26, 2020

Description

Before this PR previewGridProps and previewGridClasses had no effect if we switched to useChipsForPreview and all the chips got stacked one below the other because of the use of a simple div.

Using the already well established previewGrid props allow for much more chip customizations.

Chips are now displayed inline by default but thanks to the previewGridProps this can be changed at any time

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

I've tested it personally in one of my projects

Test Configuration:

  • Browser: Chrome

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@panz3r panz3r added this to the 3.2 milestone May 28, 2020
@panz3r
Copy link
Contributor

panz3r commented May 28, 2020

Hi @anthonyraymond ,

Thanks for your contribution, I'd ask a code review to @max-carroll because he recently worked on the Preview section of this module and probably he will need to change something in his open PR too.

@panz3r panz3r modified the milestones: 3.2, 3.3 Jun 7, 2020
@panz3r panz3r mentioned this pull request Jun 10, 2020
8 tasks
@max-carroll
Copy link
Contributor

Hi @panz3r I will have a look at this either tonight or first thing tomorrow

Copy link
Contributor

@max-carroll max-carroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, however needs the latest changes pulled in (which I'm sorry which will require a small bit of extra work since I deprecated a few of the things you used)

@max-carroll
Copy link
Contributor

Actually @panz3r I just noticed this is atop of master and not v4.x so this should be fine, however if this is to be merged into v4.x my changes will need to be considered, what do you think?

@max-carroll
Copy link
Contributor

I suppose the other alternative is we cherry pick the change into v4.x and fix it where it's not as desired

@panz3r
Copy link
Contributor

panz3r commented Jun 10, 2020

Actually @panz3r I just noticed this is atop of master and not v4.x so this should be fine, however if this is to be merged into v4.x my changes will need to be considered, what do you think?

I suppose that since we are going to consider the changes you made to the Preview section a breaking change (thus the v4.x target), any change made here that's no longer required with the new implementation will remain only on v3.x.

The idea being to leave behind a v3.x which behaves as best as possible for its current implementation while keeping on improving behaviour and design with 4.x (and later v5.x).

@max-carroll
Copy link
Contributor

In that case I will change my review to "looks good"

@max-carroll
Copy link
Contributor

In that case I will change my review to "looks good"

approve changes... sorry I have been institutionalised by TFS, if you ever see TFS anywhere, avoid it 🤣

@panz3r
Copy link
Contributor

panz3r commented Jun 10, 2020

Hi @anthonyraymond ,

Thanks for your contribution and for your patience (also thanks to @max-carroll for reviewing the code 👍 ).

The PR looks good, as @max-carroll suggested could you please add a little example inside DropzoneAreaBase.md to have a demo that references your changes, thanks in advance.

⚠️ Waiting to merge this PR because there are some small bugfixes I'd like to include into v3.2 before moving to v3.3.

Before this PR `previewGridProps` and `previewGridClasses` had no effect if we switched to `useChipsForPreview` and all the chips got stacked one below the other because of the use of a simple div.

Using the already well established **previewGrid** props allow for much more chip customizations.

Chips are now displayed inline by default but thanks to the `previewGridProps` this can be changed at any time
@anthonyraymond
Copy link
Contributor Author

Hi guys, thanks for your review.

I've added an example, but honestly i don't know if such a small thing deserves a documentation, before that PR the previewChip system wasn't aware of the component properties, i've just used the already existing properties.

@panz3r panz3r merged commit fdb8dbd into Yuvaleros:master Jun 14, 2020
panz3r pushed a commit that referenced this pull request Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants