Commit Graph

316 Commits

Author SHA1 Message Date
Simon Backx
164fdcbeb2 v0.4.0 2022-08-05 11:47:52 +02:00
James Morris
5b89bd0818 Changed the padding on the iFrame to work better with themes
- There were left over paddings that were present with old design
- Stripping back the paddings to have better placement in more themes without adjustment

refs https://github.com/TryGhost/Team/issues/1747
2022-08-05 10:28:18 +01:00
James Morris
b3a71d8c94 Fixed the avatar icon to only show if there is no image but no name
- This changes the behaviour of the Avatar component to show the icon properly
- This removes a parameter from the Avatar component

refs https://github.com/TryGhost/Team/issues/1746
2022-08-05 09:59:05 +01:00
Simon Backx
1c878615a8 Fixed comments of deleted members throwing error 2022-08-05 10:15:50 +02:00
James Morris
7ecf063b42 Added an icon for when there is no member name on comment box
- This replaces the A that showed which was a bit confusing
- Icon may still change but it feels better than what was there before
- Added new parameter for Avatar component for Blank and Anonymous

refs https://github.com/TryGhost/Team/issues/1746
2022-08-04 17:30:33 +01:00
James Morris
e4e4c07fa0 Change the title of the modal for name and bio for comments
- Trying out a new modal title as it's easier to read
- Also, works better on mobile for the modal

refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 16:49:39 +01:00
James Morris
758651013d Tidying up dialog calls for bio with correct autofocus
- Removed only showing bio in modal, now showing both always
- Changed how the modal is called with parameters to focus on bio if clicked

refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 16:46:22 +01:00
James Morris
4cc2ed88c3 Added in the right character count for bio when bio is present
refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 15:33:52 +01:00
James Morris
5128360df4 Making the buttons work for name and bio in form
refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 15:32:16 +01:00
James Morris
2027c88f58 Correctly used the max length variable for the bio text box in modal
refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 16:25:55 +02:00
James Morris
0a1b1eb70a Added in the max length counter for the bio modal
refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 16:25:55 +02:00
James Morris
1ab2787495 Little tweak to button size on mobile for comments
no issue
2022-08-04 16:25:55 +02:00
Simon Backx
d88b2e582d Wired up editing bio to API
refs https://github.com/TryGhost/Team/issues/1716

- Read bio from member
- Allow editing member
- Sync changed bio across visible comments
2022-08-04 16:25:55 +02:00
James Morris
dd06e31959 Added some rudimentary bio stuff that needs wiring up
- This adds in the bio UI into the modal
- Adds in a simple button for bio under the name in textbox
- Still needs wiring up as it data doesn't save and update yet

refs https://github.com/TryGhost/Team/issues/1716
2022-08-04 16:25:55 +02:00
Fabien "egg" O'Carroll
5530ec7b4c v0.2.4 2022-08-04 11:34:52 +01:00
Fabien "egg" O'Carroll
c87b059c0b v0.3.0 2022-08-04 10:42:59 +01:00
James Morris
a2597e5584 Added in a explicit time as a title tooltip for relative dates in comments
- Uses the title attribute to pop up the default tooltip
- No helper function introduced to generate explicit date

refs https://github.com/TryGhost/Team/issues/1741
2022-08-03 17:42:20 +01:00
Simon Backx
9b402625ca Added targetOrigin option to postMessage (admin auth)
refs https://github.com/TryGhost/Team/issues/1694
2022-08-03 15:49:16 +02:00
Simon Backx
587e5b887e Added origin check to admin auth frame message listener
refs https://github.com/TryGhost/Team/issues/1694

- Only listen to messages that are coming from the auth iframe
- Related PR for the other side: https://github.com/TryGhost/Ghost/pull/15135
2022-08-03 14:54:13 +02:00
Fabien "egg" O'Carroll
14a9fab688 Removed empty element from DOM when neither title or count are shown
refs https://github.com/TryGhost/Team/issues/1695

This is based on feedback from Sodo!
2022-08-02 22:11:01 +01:00
Simon Backx
c7655ceca0 Added keyboard shortcuts
fixes https://github.com/TryGhost/Team/issues/1725

- ESC to close/blur forms
- CMD + ESC to submit forms
- C to focus and scroll to main comment form
- ESC to close any modals (context menus or dialogs)
- keydown events are passed down from iframes to the main window to prevent having to listen on all iframes + window every time we need these events.
2022-08-02 16:43:48 +02:00
James Morris
551e12000d Removed some commented code to clean up the empty states and CTA
refs https://github.com/TryGhost/Team/issues/1704
2022-08-02 11:35:52 +01:00
Simon Backx
e7338b71d8 Fixed reply box disappearing instantly when add details dialog appears
refs https://github.com/TryGhost/Team/issues/1710
2022-08-02 10:40:54 +02:00
Simon Backx
01e2fbde7c Fixed #ghost-comments-root and renamed it to #ghost-comments
fixes https://github.com/TryGhost/Team/issues/1729
refs https://github.com/TryGhost/Team/issues/1730

Please note that it only works on initial page load for now. Browsers have custom implementations for handling URL hashes/fragments that mess with the scroll position if you reload a page.

We need a special JS based handling of the URL fragment/hash because:
- We should only scroll after the comments have loaded, else we risk landing on a higher position on the page due to content height changes.
- The DIV we scroll to (#ghost-comments-root) is inserted via JS, making it more difficult to scroll to it without JS.
- We cannot wrap the `<script>` tag that loads the comments with a different DIV that has an id where we can scroll to. This would break themes and would make it harder to work with existing CSS grids (tried this first). And we still have the first issue too if we use this.
2022-08-01 16:14:49 +02:00
Djordje Vlaisavljevic
a36233aa8a Updated colors for dark color scheme
refs https://github.com/TryGhost/Team/issues/1704
2022-07-28 20:38:05 +02:00
Fabien "egg" O'Carroll
7d60531709 Fixed the comment count displaying
refs https://github.com/TryGhost/Team/issues/1695

The count param was renamed to showCount in index.js and wasn't
updated elsewhere. This fixes that
2022-07-28 15:37:13 +01:00
Fabien "egg" O'Carroll
5ed16075b7 Fixed title conditional to allow for no title
refs https://github.com/TryGhost/Team/issues/1695

We should allow for an empty string to be passed in as the title,
which means a boolean coercion check is not appropriate, we should
check for null which in this case means to use the default title
2022-07-28 15:34:00 +01:00
Rishabh
beb8807966 Fixed resize observer error in tests
- resize observer used in auth frame is not available in Jest, so we mock it instead
- ignores missing methods on resize observer for tests
2022-07-28 19:01:24 +05:30
Rishabh
9afb36fa53 Disabled context menu edit if editing another comment
refs https://github.com/TryGhost/Team/issues/1710

- if a comment is in edit mode, it stops opening edit for another comment till existing edit mode is exited
2022-07-28 18:50:14 +05:30
Peter Zimon
d28f00656c Updated CTA styles
no issue

- typography and spacing was a bit off in the signup / upgrade CTA boxes
- the line style was inconsistent with the rest of the comments design
- button sizes and spacings needed also a bit of refinement
2022-07-28 14:19:55 +02:00
Fabien 'egg' O'Carroll
f3f6b2a98f Added ability to change title and hide comment count (#3)
refs https://github.com/TryGhost/Team/issues/1695

This allows theme developers to customise the output via the
{{comments}} helper
2022-07-28 12:21:14 +01:00
Peter Zimon
b58970f9e8 Added minor visual improvements
no issue

- applied typography changes to bio and date line as they were too strong
- padding and positioning of the comment input form was a bit misaligned
2022-07-28 13:11:39 +02:00
Peter Zimon
2906018b34 Added spinner to submit button 2022-07-28 12:19:15 +02:00
Rishabh
a10c244e7c Updated member count to use total across pagination
refs https://github.com/TryGhost/Team/issues/1695

- member count was using total comments of current page than all comments across
2022-07-28 00:22:43 +05:30
Rishabh
91d3864126 v0.2.3 2022-07-27 21:17:37 +05:30
Rishabh
8078c4a495 v0.2.2 2022-07-27 19:38:38 +05:30
James Morris
b444500f45 A few dark mode tweaks to make sure it looks nice
refs https://github.com/TryGhost/Team/issues/1703
2022-07-27 14:28:56 +01:00
James Morris
3dd1cb026a Added a truncation for mobile for the comments title 2022-07-27 14:22:45 +01:00
James Morris
c69409cbac Updated the included comment count to be dynamic
- Before it was static, with an X, but now using the variable available
- Do note, this doesn't seem to be showing the right number

refs https://github.com/TryGhost/Team/issues/1695
2022-07-27 14:03:50 +01:00
James Morris
ffabb79703 Added in the title and comments into the Comments repo, rather than in be in the theme only
refs https://github.com/TryGhost/Team/issues/1695
2022-07-27 14:00:20 +01:00
James Morris
457406a86b Added in a cancel button for when replying
refs https://github.com/TryGhost/Team/issues/1703
2022-07-27 13:39:09 +01:00
James Morris
14dedbf95a Brought the pagination style inline with the reply one
refs https://github.com/TryGhost/Team/issues/1703
2022-07-27 13:35:35 +01:00
James Morris
1ff7b15a50 Subtle fade in for comments on render and pagination
refs https://github.com/TryGhost/Team/issues/1703
2022-07-27 11:49:17 +01:00
James Morris
9bd258b461 Commented out Bio stuff for now until it can be wired up
- Please note the commenting out of code here
- We want to put this back in when Bio is available

refs: https://github.com/TryGhost/Team/issues/1716
2022-07-27 11:39:11 +01:00
James Morris
8b4b838547 Tweaking up the form shadow with some subtle hover state
- Added in a shadow hover state for the form but has to be subtle to not show cutoff

refs https://github.com/TryGhost/Team/issues/1703
2022-07-27 10:46:09 +01:00
James Morris
83928a8965 Removed the testing text for bio
refs https://github.com/TryGhost/Team/issues/1716
2022-07-27 10:24:31 +01:00
Djordje Vlaisavljevic
a4fe453bfa Fixed CTA spacing in empty state
refs #1704
2022-07-27 11:15:48 +02:00
Rishabh
c1961b30dd Updated to show only single edit box at one time
refs https://github.com/TryGhost/Team/issues/1710

- if a user is already editing/replying a comment, we shouldn't show other text boxes they can edit as it can be generally confusing
2022-07-27 14:36:08 +05:30
Djordje Vlaisavljevic
00f2d455da Updated CTA design
refs #1704
2022-07-27 10:13:52 +02:00
Djordje Vlaisavljevic
db584379fa Updated empty state design
refs #1698
2022-07-27 10:13:36 +02:00