  We expand our results in \cite{Astefanesei:2019ehu} to investigate a general
class of exact hairy black hole solutions in Einstein-Maxwell-dilaton gravity.
The dilaton is endowed with a potential that originates from an electromagnetic
Fayet-Iliopoulos term in $\mathcal{N} = 2$ extended supergravity in four
spacetime dimensions. We present the usual thermodynamics by using the
counterterm method supplemented with boundary terms for a scalar field with
mixed boundary conditions. We then extend our analysis by considering a
dynamical cosmological constant and verify the isoperimetric inequality. We
obtain a very rich phase diagram and criticality in both the canonical and
grand canonical ensembles. Within string theory, the cosmological constant is
related to the radius of the external sphere (of the compactification) and can
be interpreted as a modulus. In this context, the existence of a critical value
hints to the fact that the thermodynamic properties of black holes in lower
dimensions depend on the size of the compactification.
