Preheat oven to 350F. Line an 8-inch square pan with parchment or grease it.
In the food processor, combine the flour, sugar, baking powder and salt. Pulse to mix, then add butter and pulse until mixture is coarse. Empty into your lined pan and press tightly to make a crust. Bake for about 13 minutes or until edges start to brown. Let cool completely before making filling.
Filling: Mix together the egg, egg yolk, both sugars and the vanilla. Stir together the flour, baking powder and salt, then stir them into the batter. Add the pineapple and coconut. Pour over the cooled crust and bake for about 25 minutes. Let cool completely.
Icing: Mix together all the ingredients, using as much pineapple juice as needed to make a smooth icing. Drizzle icing over the top of the cooled bars.
Chill bars, then lift from pan and cut into 16 squares. Serve chilled or at room temperature.