Automatic layout updates for document spaces in a group-based communication system
Methods, systems, apparatuses, devices, and computer program products are described. A group-based communication system may support automatic layout updates for a document space. If a user adds an object into the document space, the system may generate a card representing the object. The card may include a link to a resource external to the document space and a preview image for the object, where the preview image may be rendered based on unfurling the link. The system may update a layout of the document space to include the generated card and may send, for display in a user interface (UI) of a user device, the updated layout. In some examples, a user may select to reposition the card within the UI (e.g., by dragging-and-dropping the card within the document space). The system may further update the layout of the document space based on the repositioning of the card.
1 . A method for document space configuration, comprising:
receiving a first input indicating insertion of an object into a document space, the object comprising a message associated with a channel of a group-based communication system, wherein the group-based communication system stores a definition of the document space that indicates the object based at least in part on the first input;
in response to the first input, generating a card representing the object, the card comprises a preview image for the object and at least one link to a resource external to the document space that is associated with the object;
automatically updating a layout of the document space to comprise an additional column, an additional row, or both, wherein the additional column, the additional row, or both includes the card, and wherein the definition of the document space further indicates a position corresponding to the card based at least in part on the automatic updating;
sending, for display in a user interface of a user device, the document space comprising the card based at least in part on the layout;
receiving a second input indicating selection and repositioning of the card in the user interface;
in response to the second input, further updating the layout of the document space based at least in part on the repositioning of the card in the user interface, wherein the further updating changes one or more positions corresponding to one or more cards indicated by the definition of the document space;
sending, for display in one or more second user interfaces of one or more second user devices, the document space in accordance with the further updating;
receiving a third input indicating selection of the at least one link;
sending, in response to the third input and for display in the user interface, a sequence of messages associated with the channel; and
navigating to the message in the sequence of messages based at least in part on a post sequence number corresponding to the message indicated by the at least one link.
2 . The method of claim 1 , further comprising:
detecting an update to the message in the channel; and
in response to the update to the message, updating the preview image for the object.
3 . The method of claim 1 , wherein:
the at least one link indicates a channel identifier associated with the channel and the post sequence number associated with a positioning of the message within the sequence of messages; and
the navigating to the message is based at least in part on the channel identifier and the post sequence number.
4 . The method of claim 1 , wherein:
the card supports a first link to the message in the channel, a second link to the channel, a third link to a user profile corresponding to an author of the message, a fourth link to a webpage, or any combination thereof; and
the fourth link to the webpage is included in text of the message.
5 . The method of claim 1 , further comprising:
retrieving a subset of information associated with the resource external to the document space, wherein the preview image for the object is based at least in part on the retrieved subset of information.
6 . The method of claim 1 , further comprising:
receiving a request to create the channel in the group-based communication system; and
in response to the request, creating the channel and the document space, wherein the document space is associated with the channel.
7 . The method of claim 6 , wherein sending, for display in the user interface of the user device, the document space comprises:
sending a second sequence of messages associated with the channel for display in a main pane of the user interface; and
sending the document space for display in a sidebar of the user interface based at least in part on the document space being associated with the channel.
8 . The method of claim 1 , further comprising:
receiving a request to create a document in the group-based communication system; and
in response to the request, creating the document space, wherein the document comprises the document space.
9 . The method of claim 1 , wherein updating the layout of the document space further comprises:
automatically resizing the card for display in the user interface based at least in part on a width of the additional column, a height of the additional row, or both.
10 . The method of claim 1 , further comprising:
further in response to the second input, sending, for display in the user interface, a thumbnail image associated with the object.
11 . The method of claim 1 , further comprising:
receiving a fourth input locking changes to the document space;
receiving a fifth input indicating selection of the card in the user interface; and
refraining from repositioning the card in the user interface in response to the fifth input based at least in part on the fourth input locking the changes to the document space.
12 . The method of claim 1 , wherein:
the document space comprises a first inline frame; and
the card comprises a second inline frame different from the first inline frame.
13 . The method of claim 1 , wherein the first input comprises dragging and dropping the object into the document space or selecting an affordance triggering the insertion of the object into the document space.
14 . The method of claim 1 , wherein the second input comprises dragging and dropping the card from a first position in the layout of the document space to a second position in the layout of the document space.
15 . The method of claim 1 , wherein the layout of the document space comprises one or more messages associated with one or more channels of the group-based communication system, one or more images, one or more files, one or more application links, one or more webpage links, one or more text blocks, or any combination thereof.
16 . The method of claim 1 , wherein:
the layout of the document space comprises a first quantity of columns and a second quantity of rows based at least in part on a threshold quantity of columns, a threshold column width, a threshold row height, or any combination thereof; and
the document space comprises one or more layouts, the one or more layouts comprising at least the layout.
17 . An apparatus for document space configuration, comprising:
at least one processor;
at least one memory coupled with the at least one processor; and
instructions stored in the at least one memory and executable by the at least one processor to cause the apparatus to:
receive a first input indicating insertion of an object into a document space, the object comprising a message associated with a channel of a group-based communication system, wherein the group-based communication system stores a definition of the document space that indicates the object based at least in part on the first input;
in response to the first input, generate a card representing the object, the card comprises a preview image for the object and at least one link to a resource external to the document space that is associated with the object;
automatically update a layout of the document space to comprise an additional column, an additional row, or both, wherein the additional column, the additional row, or both includes the card, and wherein the definition of the document space further indicates a position corresponding to the card based at least in part on the automatic updating;
send, for display in a user interface of a user device, the document space comprising the card based at least in part on the layout;
receive a second input indicating selection and repositioning of the card in the user interface;
in response to the second input, further update the layout of the document space based at least in part on the repositioning of the card in the user interface, wherein the further updating changes one or more positions corresponding to one or more cards indicated by the definition of the document space;
send, for display in one or more second user interfaces of one or more second user devices, the document space in accordance with the further updating;
receive a third input indicating selection of the at least one link;
send, in response to the third input and for display in the user interface, a sequence of messages associated with the channel; and
navigate to the message in the sequence of messages based at least in part on a post sequence number corresponding to the message indicated by the at least one link.
18 . A non-transitory computer-readable medium storing code for document space configuration, the code comprising instructions executable by a processor to:
receive a first input indicating insertion of an object into a document space, the object comprising a message associated with a channel of a group-based communication system, wherein the group-based communication system stores a definition of the document space that indicates the object based at least in part on the first input;
in response to the first input, generate a card representing the object, the card comprises a preview image for the object and at least one link to a resource external to the document space that is associated with the object;
automatically update a layout of the document space to comprise an additional column, an additional row, or both, wherein the additional column, the additional row, or both includes the card, and wherein the definition of the document space further indicates a position corresponding to the card based at least in part on the automatic updating;
send, for display in a user interface of a user device, the document space comprising the card based at least in part on the layout;
receive a second input indicating selection and repositioning of the card in the user interface;
in response to the second input, further update the layout of the document space based at least in part on the repositioning of the card in the user interface, wherein the further updating changes one or more positions corresponding to one or more cards indicated by the definition of the document space;
send, for display in one or more second user interfaces of one or more second user devices, the document space in accordance with the further updating;
receive a third input indicating selection of the at least one link;
send, in response to the third input and for display in the user interface, a sequence of messages associated with the channel; and
navigate to the message in the sequence of messages based at least in part on a post sequence number corresponding to the message indicated by the at least one link.