Skip to content

feat(card): support left and right image placement #1981

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

Merged
merged 14 commits into from Oct 26, 2018
Merged

feat(card): support left and right image placement #1981

merged 14 commits into from Oct 26, 2018

Conversation

toadkicker
Copy link
Contributor

@toadkicker toadkicker commented Aug 3, 2018

Added img-height and img-width props in case someone wants to break it themselves. Addressed #1958

@codecov
Copy link

codecov bot commented Sep 2, 2018

Codecov Report

Merging #1981 into dev will decrease coverage by 0.04%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1981      +/-   ##
==========================================
- Coverage   64.68%   64.64%   -0.05%     
==========================================
  Files         154      154              
  Lines        2911     2919       +8     
  Branches      801      804       +3     
==========================================
+ Hits         1883     1887       +4     
- Misses        739      743       +4     
  Partials      289      289
Impacted Files Coverage Δ
src/components/card/card-img.js 63.63% <50%> (-7.8%) ⬇️
src/components/card/card.js 86.95% <71.42%> (-7.79%) ⬇️

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 a87cad1...d7ddc34. Read the comment docs.

@toadkicker
Copy link
Contributor Author

This is failing in CI because CircleCI is reporting issues connecting to NPM and isn't able to build correctly. It seems that NPM is to blame in this case. Can I please have someone review this and merge if acceptable? Thank you in advance.

@toadkicker
Copy link
Contributor Author

toadkicker commented Sep 12, 2018

@tmorehouse @pi0 or someone who has CI access: can you please trigger a build (or tell me what you prefer to do) so that this will run clean now that NPM has corrected connectivity issues?

class: { 'img-fluid': props.fluid },
attrs: { src: props.src, alt: props.alt }
class: {'img-fluid': props.fluid},
attrs: {src: props.src, alt: props.alt, height: props.height, width: props.width}
Copy link
Member

Choose a reason for hiding this comment

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

Will this always add a width and height attributes to the rendered element?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it is null it is omitted

@tmorehouse
Copy link
Member

You can trigger a rebuild by making a minor edit (such as editing a comment)

Copy link
Contributor Author

@toadkicker toadkicker left a comment

Choose a reason for hiding this comment

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

merged dev and pushed in passing build

class: { 'img-fluid': props.fluid },
attrs: { src: props.src, alt: props.alt }
class: {'img-fluid': props.fluid},
attrs: {src: props.src, alt: props.alt, height: props.height, width: props.width}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it is null it is omitted

if (props.left) {
staticClass += '-left'
}
if (props.right) {
Copy link
Member

Choose a reason for hiding this comment

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

Should these be a series of if { } else if { } else if { }... statements rather than a series of if { } statements?

This would set an order of precedence for the position props, i.e. maybe top, bottom left then right . This would then prevent the strings from being possibly concatenated (i.e. card-img-left-right-bottom)

And maybe, should we use start and end instead of left and right?

}
if (props.imgRight) {
Copy link
Member

Choose a reason for hiding this comment

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

Should these if statements also be if { } else if { }... to handle order of precedence of the position props?

@tmorehouse
Copy link
Member

Also appears that the image overlay option is no longer working ;-)

image

It appears the <img> is not being inserted into the card.

@tmorehouse tmorehouse changed the title feat (card) support left and right image placement feat(card): support left and right image placement Oct 26, 2018
@tmorehouse tmorehouse merged commit 66194a6 into bootstrap-vue:dev Oct 26, 2018
shinrox added a commit to shinrox/bootstrap-vue that referenced this pull request Oct 26, 2018
* dev: (31 commits)
  feat(card): support left and right image placement (bootstrap-vue#1981)
  fix(collapse/toggle): "collapsed" class cleared when component updated (bootstrap-vue#2102)
  fix(form-file): Add validation of single file (bootstrap-vue#2028)
  chore(docs): minor update to the b-form-input docs
  chore(docs): Minor update to b-form-input docs
  feat(table): Add row-unhovered event (bootstrap-vue#1874)
  feat(table): Support contextmenu event binding for table rows (bootstrap-vue#2064)
  docs(table): fix minor typo (bootstrap-vue#2093)
  feat(table): Support sorting on nested object properties (bootstrap-vue#1868)
  perf(modal): optimize model.resetScrollbar, resolves bootstrap-vue#1831  (bootstrap-vue#1837)
  docs: Update images reference section (bootstrap-vue#1999)
  fix(observe-dom): fix comment typo (bootstrap-vue#2084)
  chore(modal): trivial word fix in comment (bootstrap-vue#2089)
  (docs): Fix grammer in Intro readme (bootstrap-vue#2092)
  fix(modal): prevent scrolling on .modal-content focus, fixes bootstrap-vue#1748 (bootstrap-vue#2060)
  feat(pagination):  added slots for first, prev, next, last, and ellipsis. Fixes bootstrap-vue#1870. (bootstrap-vue#1980)
  Handle state change on validated fields. (bootstrap-vue#1984)
  fix(docs): input group prepend slot typo (bootstrap-vue#2059)
  fix(dependencies): replace opencollective with opencollective-postintall (bootstrap-vue#2067)
  fix(docs): change b-input-group attribute 'left' to 'prepend' (bootstrap-vue#2017)
  ...
@tmorehouse tmorehouse mentioned this pull request Nov 14, 2018
89 tasks
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

Successfully merging this pull request may close these issues.

2 participants