Finding topologically sorted connected components in directed acyclic graph
Standard algorithms for computing strongly connected components label each vertex with a number indicating which component it is part of.  Then, you can use that to construct the "metagraph" of components (where each component of the graph is a vertex of the metagraph, and there is an edge $i \to j$ in the metagraph iff there is an edge $v \to w$ in the original graph where $v$ is in component $i$ and $w$ is in component $j$) in linear time.  Finally, you can apply a topological sorting algorithm on the metagraph.

Some algorithms for computing strongly connected components (such as Tarjan's algorithm) already do that for you for free.  Or, you can do it yourself as a postprocessing phase; since it takes only linear time, it won't increase the asymptotic running time of the algorithm.

See, e.g., https://en.wikipedia.org/wiki/Strongly_connected_component, https://en.wikipedia.org/wiki/Kosaraju%27s_algorithm, and https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm.