There's a time for everything. Chazal (Sanhedrin 107b) have told us an ironclad rule in chinuch: דוחה ושמאל מקרבת ימין ואשה תינוק יצר, [Regarding] the yetzer hara, a child, and a woman, the right hand must draw them close while the left hand pushes away. The Mefarshim (see Yad Ramah, ibid.) explain that the right hand must draw them close more so than the left hand pushes them away.
There's a time when the right hand must draw close, and there's a time when the left hand pushes away; a time for closeness and a time for distance. And the Midrash is teaching us that Shabbos Kodesh is a time for closeness and love—a time for "the right hand to draw close."
Similarly, when the Ran taught that Shabbos is a time for playing with the children, it means to play with them on their level—not on your own. Otherwise, it's not playing... it's abuse....
In our times, there is much debate about how much to utilize the ימין מקרבת, drawing close with the right hand. What to do when a child does something very wrong... and so forth. But it is clear from the Gemara and the Mefarshim that Shabbos Kodesh is a time for closeness, love, and joy with our children.