From: justin melvin Date: Wed, 6 Jan 2021 05:18:17 +0000 (-0800) Subject: Put -SOLVED as a suffix on sheet names and not a prefix to preserve X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=408a27119a549bba8e4e27f60f13354cf074359f;hp=7fc57de6c1ea989befa35ed47e1aba6dfa7a796c;p=turbot Put -SOLVED as a suffix on sheet names and not a prefix to preserve alphabetical ordering. --- diff --git a/TODO b/TODO index bf232bd..34481a6 100644 --- a/TODO +++ b/TODO @@ -81,12 +81,6 @@ Sheet-related fixes have backup access to all of them on the off chance of Slack not being available.) -• Question: Having "SOLVED" at the beginning of the sheet name is nice - for makint it noticeable with the sheet open, but it changes the - order of the sheet in the folder view. Do we maybe want to put - "SOLVED" at the end of the name so that puzzle sheets can be - reliably found in an ordered position regardless of solved status? - • Come up with a better sheet template • Put the puzzle's name into the primary tab of the sheet diff --git a/turbot/interaction.py b/turbot/interaction.py index e6f7503..b50a658 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -598,9 +598,9 @@ def solved(turb, body, args): # And update the puzzle's description set_channel_topic(turb, puzzle) - # And rename the sheet to prefix with "SOLVED: " + # And rename the sheet to suffix with "-SOLVED" turbot.sheets.renameSheet(turb, puzzle['sheet_url'], - 'SOLVED: ' + puzzle['name']) + puzzle['name'] + "-SOLVED") # Finally, rename the Slack channel to add the suffix '-solved' channel_name = "{}-{}-solved".format(