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

Add BS5 support #350

Merged
merged 51 commits into from
Aug 2, 2021
Merged

Add BS5 support #350

merged 51 commits into from
Aug 2, 2021

Conversation

ndm2
Copy link
Collaborator

@ndm2 ndm2 commented May 30, 2021

As hinted in #349, this PR isn't finished yet, depending on the feedback I'd resolve additional outstanding points and add to this PR.

That being, said, what's already included, is ready to be reviewed. It looks like a lot, but the largest part of the changes is in the tests, and that's mostly a lot of small snippets, like added/removed/moved classes and slight markup structure changes.

@codecov
Copy link

codecov bot commented May 30, 2021

Codecov Report

Merging #350 (d57626f) into bs5 (7de9eeb) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                bs5     #350      +/-   ##
============================================
+ Coverage     99.25%   99.29%   +0.04%     
- Complexity      329      332       +3     
============================================
  Files            21       21              
  Lines           934      994      +60     
============================================
+ Hits            927      987      +60     
  Misses            7        7              
Impacted Files Coverage Δ
src/View/Widget/BasicWidget.php 100.00% <ø> (ø)
src/View/Widget/ButtonWidget.php 100.00% <ø> (ø)
src/View/Widget/DateTimeWidget.php 100.00% <ø> (ø)
src/View/Widget/FileWidget.php 100.00% <ø> (ø)
src/View/Widget/SelectBoxWidget.php 100.00% <ø> (ø)
src/View/Widget/TextareaWidget.php 100.00% <ø> (ø)
src/Command/InstallCommand.php 98.59% <100.00%> (+0.09%) ⬆️
src/View/Helper/FlashHelper.php 100.00% <100.00%> (ø)
src/View/Helper/FormHelper.php 99.22% <100.00%> (-0.02%) ⬇️
src/View/Helper/HtmlHelper.php 100.00% <100.00%> (ø)
... and 3 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 7de9eeb...d57626f. Read the comment docs.

@ndm2
Copy link
Collaborator Author

ndm2 commented May 30, 2021

I've also updated my UI test app for this, however somehow composer isn't able to require commit hashes anymore for me, but that's a problem for tomorrow.

edit: OK, alternatively, for those who reeeaaally want to use it for having a quick look at the output (it now also comes with views for bake templates and layouts, so it's easy to spot what's broken there), in step 2, do this instead:

composer config repositories.bui vcs https://github.com/ndm2/bootstrap-ui
composer require --no-update friendsofcake/bootstrap-ui:dev-bs5-support

@ndm2
Copy link
Collaborator Author

ndm2 commented May 31, 2021

The flexbox attempt for inline forms wasn't the proper way, so if anyone's looking at it, just ignore that for now, I'll try to fix that next using rows/cols.

@ndm2
Copy link
Collaborator Author

ndm2 commented Jun 1, 2021

So I've decided to go for auto-sizing for inline forms, using columns that stack based on window size felt wrong.

However I'm not going to check off that point, as people might have thoughts about this solution.

Furthermore this also enables rendering the error messages for inline
checkboxes/switches as tooltips.

To achieve the same behavior as in earlier versions, rendering errors
can be disabled via control options.
@ndm2
Copy link
Collaborator Author

ndm2 commented Jul 6, 2021

If anyone's wondering, this is what help text and errors for inlined checkboxes/switches in non-inline layouts looks like:

image
image

It's generally nice to have if one wants it, and allowing this will also make adding support for aria-describedby and, possibly custom help classes easier.

Furthermore this change makes it possible to add custom classes to help
text elements via options.
@dereuromark
Copy link
Member

dereuromark commented Jul 14, 2021

The other night I added autocomplete for bootstrap icons - see PR #350 for FormatHelper::icon()

I bet the HtmlHelper::icon() in this repo could also benefit from some kind of IdeHelper task that provides optional autocomplete for IDEs like PHPStorm on those magic strings (icon names).
This way you can just get the possible names from typeahead dropdown.

demo

@ndm2
Copy link
Collaborator Author

ndm2 commented Jul 14, 2021

I'm not gonna stop anyone from pushing a PR 😛

@ndm2 ndm2 mentioned this pull request Jul 16, 2021
3 tasks
Makes the list of column sizes a numerically indexed array, avoiding
assumptions about the number of possible columns.

Abandons the `right`/third column config altogether, as it was never
actually used.
@ndm2
Copy link
Collaborator Author

ndm2 commented Jul 17, 2021

Finally! Remember kids, if you just add enough code you'll eventually reach the minimum coverage ratio 😄

image

ndm2 added 8 commits July 17, 2021 22:32
Typehints, formatting, unused code, etc...
Unifies ARIA usage for all controls, and adds support for specifying
ARIA label text via options, making it possible to avoid using custom
templates.

Also makes the core methods respect the helper configuration, and as a
side effect adds support for custom templates via options for the
`first()`/`last()` methods.
Some fixes, a little restructuring, adds new sections so that most
features are documented.
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@ndm2
Copy link
Collaborator Author

ndm2 commented Jul 22, 2021

So that's it for now, I'm not going push further changes (except after review feedback of course). If anyone wants to review this big pile of changes in peace - now's your chance :)

ndm2 and others added 2 commits July 31, 2021 14:37
Co-authored-by: Mark Sch. <dereuromark@users.noreply.github.com>
@ndm2
Copy link
Collaborator Author

ndm2 commented Jul 31, 2021

So if there aren't any objections I'd merge this soon, and then maybe we can release an alpha/preview to possibly garner some feedback.

@ndm2 ndm2 merged commit 79c7de0 into FriendsOfCake:bs5 Aug 2, 2021
@ndm2
Copy link
Collaborator Author

ndm2 commented Aug 2, 2021

So here we go... as requested, I'll tag you now that it's merged @ADmad 😛

@ADmad
Copy link
Member

ADmad commented Aug 3, 2021

@ndm2 Do you need me to actually do anything? 🙂 You can start the alpha/beta as you see fit.

@ndm2
Copy link
Collaborator Author

ndm2 commented Aug 4, 2021

Not really, I guess... you just said "tag me when it's merged" :) If you're cool with it, then I'll draft an alpha pre-release.

@dereuromark
Copy link
Member

Did you want to try to make a PR for the sandbox, to showcase some live demo cases of it?

@ndm2
Copy link
Collaborator Author

ndm2 commented Aug 5, 2021

Maybe later when things are finalized, I'm not familiar with the Sandbox app yet.

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.

None yet

4 participants