Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Adds More Information to Summary Panel #100

Merged
merged 19 commits into from
Nov 20, 2023

Conversation

harrisoncramer
Copy link
Owner

@harrisoncramer harrisoncramer commented Nov 16, 2023

Adds new info panel to the summary view to give users more information about the current merge request:

Screenshot 2023-11-16 at 9 07 07 AM

This panel can be configured to be visible either underneath (default) the description, or to the left. Users can also turn it on or off, and configure which fields are displayed in it.

@harrisoncramer harrisoncramer linked an issue Nov 16, 2023 that may be closed by this pull request
@@ -47,6 +47,33 @@ M.press_enter = function()
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<CR>", false, true, true), "n", false)
end

M.offset_to_seconds = function(offset)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this works in other timezones, it works perfectly for EST.

Basically we get the time from the MR, get the user's current timezone offset, convert that to seconds, and then add/subtract those seconds from the time of the MR (which is UTC). We then reconvert that numeric value back into a readable string.

Parsing dates in Lua is difficult without any external dependencies!

@harrisoncramer harrisoncramer merged commit c4a3229 into main Nov 20, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: More Information in Summary View
1 participant