For Roth account, the way I understand is that the amount that you contributed is not taxable if you hold more than 5 years but your gain is taxable no matter how long you have held.
OK so what I do and it is not quite legal but I will play dumb is that my contribution over the years have been substantial and longer than 5 years, So when I withdraw, how does the IRS know which part did I withdraw? Myself, I don't even remember how much I have contributed unless I look up my record.
Every year when I contributed to my IRA (conventional or Roth) TDA filed with the IRS how much I contributed. So I hope that IF IF IF IF I wait for a while like 10+ year to withdraw then the IRS will forget which part of my money it is. So I have other money to live on during the first part of my retirement and only have to dip into my IRA at the end.