Merge "Extract out the dumpViewerConfig to avoid duplication" into main