botman / driver-telegram

BotMan Telegram Driver
MIT License
87 stars 75 forks source link

Test send grouped buttons to Telegram in inline_keyboard #50

Closed Lloople closed 5 years ago

Lloople commented 6 years ago

Be able to send grouped buttons and display them like this

+-----------+  +----------+ 
|  Button 1 |  | Button 2 |
+-----------+  +----------+

Instead of this

+-----------+ 
|  Button 1 |
+-----------+
+-----------+ 
|  Button 2 |
+-----------+ 

I have to mention, @mpociot, that I don't understand how the other tests are returning the payload needed for grouped buttons without grouping them 🤷‍♂️. I'm talking about https://github.com/botman/driver-telegram/blob/32ed131c73ee09791e320557340e663d90d7b45d/tests/TelegramDriverTest.php#L761

https://github.com/botman/driver-telegram/blob/32ed131c73ee09791e320557340e663d90d7b45d/tests/TelegramDriverTest.php#L706

They are returning the inline_keyboard the same way this new code try to build

codecov[bot] commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@5ced159). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #50   +/-   ##
=========================================
  Coverage          ?   76.64%           
  Complexity        ?      120           
=========================================
  Files             ?       11           
  Lines             ?      381           
  Branches          ?        0           
=========================================
  Hits              ?      292           
  Misses            ?       89           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
src/TelegramDriver.php 93.71% <100%> (ø) 47 <2> (?)

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 5ced159...d3092be. Read the comment docs.

Lloople commented 5 years ago

I closed this PR because this code works for sending the Question but not for creating it.

This feature will need to do more to work both ways, I'll prepare something bigger if @mpociot agrees, I really need to group keyboard buttons 😅