Closed bpedersen2 closed 7 years ago
Hi there,
Thanks a lot for the PR. I have only one thing to suggest: you're re-using the white
and white_highlight
keys, which will work but then override the palette entries that would normally get those names. We want %{white}
in a log message to actually return white. Maybe we can just call those white_on_(white|yellow)[_highlight]
?
Looking at the code, it seems like there is a more general problem in the papers migration:
The foreground color is fixed to white:
self.print_info('\tRevision %[blue!]{}%[reset] %[white,{}] %[reset] {}'.format( n, STATE_COLOR_MAP[state], review_colors))
And white on white does not make too much sense. Probably the STATE_COLOR_MAP should get expaned to also supply the fg color.
I think it would be much simpler to use a different color for submitted papers. Maybe blue? That would save us from complicating the color choosing logic.
If running migration in verbose mode some palette entries were missing:
indico_migrate/steps/events/papers.py:118 [migrate] indico_migrate/steps/events/papers.py:346 [_migrate_papers] indico_migrate/steps/events/papers.py:317 [_migrate_revisions] indico_migrate/gui.py:89 [color_segments] result.append((PALETTE[current_format], text))
(u'white', u'yellow', False)
indico_migrate/steps/events/papers.py:118 [migrate] indico_migrate/steps/events/papers.py:346 [_migrate_papers] indico_migrate/steps/events/papers.py:317 [_migrate_revisions] indico_migrate/gui.py:87 [color_segments] result.append((PALETTE[current_format], text))
(u'white', u'white', False)