Heat a large skillet over medium heat. Add onion, bay leaf and salt and cook gently until the onion is soft and aromatic, about 10 minutes.
Add the leeks and cook, stirring for three more minutes. Then add the pancetta, garlic, mushrooms and thyme. Cook for 5 more minutes.
Add the wine and allow it to simmer for 3 minutes. Then add the stock and simmer for another 3 minutes to reduce the mixture.
Stir in the artichokes and simmer for 10 minutes.
Meanwhile, make a roux by melting the butter in a separate pan over medium-low heat. Add the flour and stir constantly for 3-5 minutes until the mixture thickens.
Add the roux to the artichoke mixture and cook for another 3-5 minutes until it thickens slightly.
Remove from heat and stir in ricotta and parmesan. Set aside and cool slightly.
Take the pastry from the refrigerator. Flour your work surface and roll the dough to about 1/8-inch thick. Cut into a 9” circle or keep rectangular. Transfer to a baking sheet lined with parchment paper.
Leaving a 3-inch border around the edges, top the dough with the artichoke mixture. Fold the edges of the dough over the filling. Brush the crust with the beaten egg.
Bake the galette for 45-55 minutes or until the crust is golden. Allow to cool 5 minutes and then slice and serve.