  We used high-resolution resonant inelastic x-ray scattering (RIXS) at the Ni
$L_3$ edge to simultaneously investigate high-energy interband transitions
characteristic of Ni-O bond ordering and low-energy collective excitations of
the Ni spins in the rare-earth nickelates $R$NiO$_3$ ($R$ = Nd, Pr, La) with
pseudocubic perovskite structure. With the support of calculations based on a
double-cluster model we quantify bond order (BO) amplitudes for different thin
films and heterostructures and discriminate short-range BO fluctuations from
long-range static order. Moreover we investigate magnetic order and exchange
interactions in spatially confined $R$NiO$_3$ slabs by probing dispersive
magnon excitations. While our study of superlattices (SLs) grown in the (001)
direction of the perovskite structure reveals a robust non-collinear spin
spiral magnetic order with dispersive magnon excitations that are essentially
unperturbed by BO modulations and spatial confinement, we find magnons with
flat dispersions and strongly reduced energies in SLs grown in the
$(111)_{\text{pc}}$ direction that exhibit collinear magnetic order. These
results give insight into the interplay of different collective ordering
phenomena in a prototypical 3$d$ transition metal oxide and establish RIXS as a
powerful tool to quantitatively study several order parameters and the
corresponding collective excitations within one experiment.
