Continuous weak form
Though I think the weak form is more fundamental, suppose we start with the strong divergence-form representation for a (first- or) second-order quasilinear PDE: find the $m$-component solution $u \in R^m(\Omega)$
$$ -\nabla \cdot f_1(u,\nabla u) + f_0(u,\nabla u) = 0 $$
on the domain $\Omega \subset R^d$ with (for simplicity) homogeneous Dirichlet boundary condition $u|_{\partial \Omega} = 0$. The function $f_1 : R^m \times R^{m\times d} \to R^{m\times d}$ defines a "conservative" flux and $f_0 : R^m \times R^{m\times d} \to R^m$ is a source term (including non-conservative transport).
If the strong form above is true, it must also be the case that for all test functions $\phi \in R^m(\Omega)$,
$$ \int_\Omega \phi \cdot \Big(- \nabla \cdot f_1 + \cdot f_0 \Big) = 0 . $$
Integrating by parts and using the fact that $u = 0$ on the boundary, we see that
$$ \int_\Omega \nabla \phi :\, f_1 + \phi \cdot f_0 = 0,$$
which is the equation in your question.
Discretization
When we discretize, we choose a finite number of test functions for which to satisfy the weak form. Each test function produces one equation. The solution space is also discretized, typically with the same number of degrees of freedom (Galerkin methods equate the test space with the ansatz space). If we express the test and trial functions in a basis $\{ e_1, e_2, \dotsc, e_n \} \subset R^m(\Omega)$, we have a set of equations
$$ \int_\Omega \nabla e_i :\, f_1(u_h,\nabla u_h) + e_i \cdot f_0(u_h, \nabla u_h) = 0, \quad i \in \{1, \dotsc, n \} $$
where the discrete solution $u_h$ is expressed in the same basis, $u_h =\sum_i u^i e_i$. We can enumerate the left side of the above equations as
$$F^i(\mathbf u) = 0, \quad i \in \{1, \dotsc, n\}$$
where $\mathbf u = \{u^1, \dotsc, u^n\} \in R^n$, forming a vector $\mathbf F = \{F^1,\dotsc,F^n\} \in R^n$. Note that we have selected a basis and now deal only with components. The discrete equations are thus completely represented by the (linear or nonlinear) function $\mathbf F : R^n \to R^n$, mapping discrete vectors $\mathbf u$ in the ansatz space to residual vectors.
Solving $\mathbf F(\mathbf u)=0$ is equivalent to saying
$$\mathbf\phi^T \mathbf F(\mathbf u) = 0$$
for all test functions $\mathbf\phi \in R^n$. Each of these discrete equations is a statement of the continuous weak form for $\phi_h = \sum_i \phi^i e_i$ and $u_h = \sum_i u^i e_i$. This relationship inspires my notation that the discrete form corresponds ($\sim$) to the continuous equation
$$\mathbf\phi^T \mathbf F(\mathbf u) \sim \int_\Omega \nabla \phi_h :\, f_1(u_h,\nabla u_h) + \phi_h \cdot f_0(u_h, \nabla u_h) = 0 .$$
Implementation
In practice, the integrals are usually evaluated by quadrature on each element (and the finite-element basis functions $e_i$ have compact support only on the adjacent elements). I like the notation in the second equation of your question because it highlights the linear and nonlinear components and corresponds to a good way to organize code for a flexible and efficient implementation.